# mocha-lazy-bdd

> Lazy bdd interface for mocha that provides RSpec-style let/subject macros for ES5+ projects.

Latest version **0.1.4** (published 2018-03-08) · ISC license · 0 weekly downloads

## Install

```sh
npm install mocha-lazy-bdd
pnpm add mocha-lazy-bdd
yarn add mocha-lazy-bdd
bun add mocha-lazy-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.4 |
| Published | 2018-03-08 |
| First published | 2014-12-28 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 189.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 15 |
| Author | Gordon L. Hempton |
| Maintainers | ghempton |
| Keywords | mocha, rspec, lazy, bdd, let, subject |

## Links

- npm: https://www.npmjs.com/package/mocha-lazy-bdd
- Repository: https://github.com/ghempton/mocha-lazy-bdd
- Homepage: https://github.com/ghempton/mocha-lazy-bdd#readme
- Issues: https://github.com/ghempton/mocha-lazy-bdd/issues
- npm.io page: https://npm.io/package/mocha-lazy-bdd

## Dependencies (1)

- [escape-string-regexp](https://npm.io/package/escape-string-regexp.md) ^1.0.3

## 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
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads
- [aws-elasticsearch-connector](https://npm.io/package/aws-elasticsearch-connector.md) — 37.4K weekly downloads

## Recent versions

- 0.1.4 (latest) — 2018-03-08
- 0.1.3 — 2018-03-08
- 0.1.2 — 2017-01-05
- 0.1.1 — 2016-11-02
- 0.1.0 — 2016-04-05
- 0.0.6 — 2015-09-24
- 0.0.5 — 2015-03-08
- 0.0.4 — 2014-12-29
- 0.0.3 — 2014-12-28
- 0.0.2 — 2014-12-28
- 0.0.1 — 2014-12-28

## README

# Mocha Lazy BDD

This module provides a Lazy BDD interface to mocha. The interfaces is identical to the standard `bdd` interface, but also provides additional RSpec-style `lazy`/`subject` macros.

## Example Spec

```javascript
var expect = require('chai').expect;

describe('mocha-lazy-bdd', function() {
  
  describe('lazy', function() {
    
    lazy('value', function() {
      return 'i am lazy';
    });
    
    it('returns the specified value', function() {
      expect(this.value).to.eq('i am lazy');
    });
    
  });
  
});
```

See [this project's specs](https://github.com/ghempton/mocha-lazy-bdd/blob/master/spec.js) for more examples.

## Installation and Usage

```
npm install --save-dev mocha-lazy-bdd
mocha -u mocha-lazy-bdd
```

Or in a browser environment: install `mocha-lazy-bdd` via bower and then include the distribution before mocha has been setup.

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