Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use nyc instead of babel-istanbul for code coverage #1

Open
rewop opened this issue Aug 25, 2016 · 0 comments
Open

Use nyc instead of babel-istanbul for code coverage #1

rewop opened this issue Aug 25, 2016 · 0 comments

Comments

@rewop
Copy link

rewop commented Aug 25, 2016

For better support of babel, and for simpler setup, we are now using https://github.com/istanbuljs/nyc in several of our services.

We could update this boilerplate so it will be set already for future modules.

How to set it up:

  • update package.json scripts with the following lines
"mocha": "NODE_ENV=test mocha --timeout 10000 --compilers babel-register --recursive $(find src -name __test__ -not -path '*/node_modules/*')",
    "test": "NODE_ENV=test nyc --reporter=lcov --reporter=text-summary --reporter=html npm run mocha",
    "cov-check": "nyc check-coverage --statements 80 --branches 70 --functions 60",
    "cov-report-html": "open coverage/index.html",
    "cov-report-text": "nyc report"
  • remove babel-istanbul dependency
  • install dev dependencies nyc and babel-plugin-istanbul
  • Add istanbul plugin in .baberc file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant