Plugin test-runner-nyc
Unit testing and coverage check whit NYC
Instalation
For install, simply run
npm install -g runas-plugin-test-runner-nyc
Available functions
runTestsAndCheckCoverage addon
this.runTestsAndCheckCoverage(params)
attemps to check the coverage of your
unit-testing suite
Param | Type | Description |
---|---|---|
params | Object | Object with the configuration for Nyc |
Example:
{ return this;}
Example of params:
The more important parameters (all them are documented here):
- "_" : array with the executable. If you want to execute "npm test" you have to create the ["npm", "test"] value in this param.
- "all": boolean. If true the instrumentation is in all the files of the repo and not only in the ones that the executable passes.
- "checkCoverage": boolean. Checks the percentages of coverage according to the "statements", "branches", "functions" and "lines" values.