runas-plugin-test-runner-nyc
Plugin for unit testing in npm libraries (and for recipes of runas)
Last updated 3 years ago by apecr .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install runas-plugin-test-runner-nyc 
SYNC missed versions from official npm registry.

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

  1. runTestsAndCheckCoverage() addon

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:

run: function() {
  return this.runTestsAndCheckCoverage(params);
}

Example of params:

{
  "_": [
    "npm",
    "test"
  ],
  "all": true,
  "reportDir": "test-reports",
  "reporter": [
    "text-summary",
    "lcov",
    "html"
  ],
  "exclude": [
    "node_modules",
    "*-test.js",
    "test-reports/**",
    "test/**"
  ],
  "checkCoverage": true,
  "statements": 70,
  "branches": 70,
  "functions": 70,
  "lines": 70
}

The more important parameters (all them are documented here):

  1. "_" : array with the executable. If you want to execute "npm test" you have to create the ["npm", "test"] value in this param.
  2. "all": boolean. If true the instrumentation is in all the files of the repo and not only in the ones that the executable passes.
  3. "checkCoverage": boolean. Checks the percentages of coverage according to the "statements", "branches", "functions" and "lines" values.

Current Tags

  • 0.2.0-beta.0                                ...           beta (3 years ago)
  • 0.2.0                                ...           latest (3 years ago)

5 Versions

  • 0.2.0                                ...           3 years ago
  • 0.2.0-beta.0                                ...           3 years ago
  • 0.1.0                                ...           3 years ago
  • 0.1.0-beta.1                                ...           3 years ago
  • 0.1.0-beta.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 10
Dependencies (6)
Dev Dependencies (5)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |