New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

generator-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

generator-bdd

A Yeoman generator that makes it easy to start writing unit tests within your Node.js application.

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
increased by300%
Maintainers
1
Weekly downloads
 
Created
Source

generator-bdd

A Yeoman generator that makes it easy to start writing unit tests within your Node.js application. It will add mocha, chai, sinon and istanbul to your application. It will also add 2 .js files. One containing the system under test and the other a failing test against the former.

How to

Install Yeoman and generator-bdd using the following npm command:

$ npm install -g yo generator-bdd

cd to your application's directory that contains already a package.json, then:

$ yo bdd

The generator will add/update the following items to your application:

application
├── node_modules
│   ├── chai
│   ├── istanbul
│   ├── mocha
│   └── sinon
├── package.json
├── test
│   └── greeter.spec.js
└── greeter.js

In particular it will add 2 npm scripts to your existing package.json

{
  "scripts": {
    "coverage": "istanbul cover _mocha test --  --recursive",
    "test": "mocha --recursive"
  }
}

At the very end of its execution, the generator will also run npm run coverage that will produce a coverage report

Keywords

FAQs

Package last updated on 17 Sep 2016

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc