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

Add istanbul to Build System #2

Closed
CharlieGreenman opened this issue Nov 15, 2016 · 3 comments
Closed

Add istanbul to Build System #2

CharlieGreenman opened this issue Nov 15, 2016 · 3 comments

Comments

@CharlieGreenman
Copy link
Owner

Currently Mocha and Chai are implemented with ES6. However, the build is currently lacking istanbul, which gives the following error: No coverage information was collected, exit without writing coverage information.

It might be related to the following: gotwarlost/istanbul#262

@CharlieGreenman
Copy link
Owner Author

CharlieGreenman commented Nov 16, 2016

Look into using nyc. Seems to make more sense with what we are trying to achieve.

https://github.com/istanbuljs/nyc

http://stackoverflow.com/questions/33621079/running-mocha-istanbul-babel

@CharlieGreenman
Copy link
Owner Author

Also make sure to include cross-env, so that babel-istanbul is picked up when using a test environment: https://github.com/istanbuljs/nyc

@CharlieGreenman
Copy link
Owner Author

Issue solved. Using the following command
"test": "istanbul cover _mocha",
and the following options in mocha.opts

--colors
--reporter spec
--timeout 1000
--check-leaks
--compilers js:babel-core/register
--require babel-polyfill
--recursive
--sort
src/app/**/*.spec.js

Credit must be given where credit is deserved. Config for mocha.opts found in the following thread thread. However, used mocha.opts instead of conf, and did not use all of npm task as it is superfluous.

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