# markdown-bdd

> Use code blocks from markdown documents in your tests

Latest version **0.1.0-rc1** (published 2014-06-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install markdown-bdd
pnpm add markdown-bdd
yarn add markdown-bdd
bun add markdown-bdd
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0-rc1 |
| Published | 2014-06-01 |
| First published | 2014-06-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | jpommerening |
| Keywords | markdown, code, test, bdd, mocha |

## Links

- npm: https://www.npmjs.com/package/markdown-bdd
- Repository: https://github.com/jpommerening/node-markdown-bdd
- Issues: https://github.com/jpommerening/node-markdown-bdd/issues
- npm.io page: https://npm.io/package/markdown-bdd

## Dependencies (3)

- [async](https://npm.io/package/async.md) ~0.9.0
- [eval-stream](https://npm.io/package/eval-stream.md) ~0.1.0
- [md-code-stream](https://npm.io/package/md-code-stream.md) ~0.1.0

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads

## Recent versions

- 0.1.0-rc1 (latest) — 2014-06-01

## README

# 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:

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

---
_Source: https://npm.io/package/markdown-bdd · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
