New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

markdown-bdd

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markdown-bdd

Use code blocks from markdown documents in your tests

latest
Source
npmnpm
Version
0.1.0-rc1
Version published
Maintainers
1
Created
Source

markdown-mdd

Use code blocks from markdown documents in your tests

Take this README file for example. There are multiple code blocks in here, that serve as usage examples for the user. However, since these examples are supposed to describe what the module does, why not go ahead and use them as the specification?

Usage Example

Ok, hang on, I'll explain later. First have a look at this example:

var markdownBdd = require('markdown-bdd');

// declare what to use as input and what global variables to assume
var example = markdownBdd('README.md', {
  describe: describe,
  example: function() {},
  it: it
});

describe('markdown-bdd', function() {
  example('Usage Example', function() {
    it('should be runnable with mocha', function (done) {
      // ...
    });
  });
});

Keywords

markdown

FAQs

Package last updated on 01 Jun 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts