mb

markdown-bdd

Use code blocks from markdown documents in your tests

Showing:

Popularity

Downloads/wk

0

GitHub Stars

0

Maintenance

Last Commit

7yrs ago

Contributors

0

Package

Dependencies

3

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

markdown-bdd

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) {
      // ...
    });
  });
});

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial