@istanbuljs/nyc-config-babel
nyc configuration that works with babel-plugin-istanbul
Last updated 10 months ago by coreyfarrell .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @istanbuljs/nyc-config-babel 
SYNC missed versions from official npm registry.

nyc-config-babel

Handy default configuration for instrumenting your babel-backed project with test coverage using nyc and babel-plugin-istanbul.

First install the dependencies:

npm i babel-plugin-istanbul @istanbuljs/nyc-config-babel --save-dev

Then write a .babelrc that looks something like this:

.babelrc

{
    "presets": ["@babel/env", "..., etc."],
    "plugins": ["istanbul"]
}

.nycrc

And write a .nycrc that looks something like this:

{
    "extends": "@istanbuljs/nyc-config-babel"
}

Running Tests

Now setup the test scripts in your package.json like so:

{
    "test": "nyc mocha test.js"
}

License

ISC

Current Tags

  • 3.0.0                                ...           latest (10 months ago)

13 Versions

  • 3.0.0                                ...           10 months ago
  • 3.0.0-alpha.2                                ...           10 months ago
  • 3.0.0-alpha.1                                ...           a year ago
  • 3.0.0-alpha.0                                ...           a year ago
  • 2.1.1                                ...           a year ago
  • 2.1.0                                ...           2 years ago
  • 2.0.1                                ...           2 years ago
  • 2.0.0                                ...           2 years ago
  • 1.2.3                                ...           3 years ago
  • 1.2.2                                ...           3 years ago
  • 1.2.1                                ...           3 years ago
  • 1.2.0                                ...           3 years ago
  • 1.1.0                                ...           3 years ago
Downloads
Today 0
This Week 2
This Month 13
Last Day 2
Last Week 7
Last Month 64
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (1)

Copyright 2014 - 2016 © taobao.org |