isparta
A code coverage tool for ES6 (babel)
Last updated 6 years ago by douglasduteil .
WTFPL · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install isparta 
SYNC missed versions from official npm registry.

isparta Build Status NPM version No Maintenance Intended

Isparta is a code coverage tool for ES6 using babel.

Its intention is to be used with karma and karma-coverage, which provides code coverage reports using istanbul.

CHANGELOG

Installation

Isparta can be installed using

$ npm install --save-dev isparta

Usage

Not all the istanbul command/options are available with isparta
Consult isparta -h for more information

Here is an example to run a coverage over mocha tests

babel-node node_modules/isparta/bin/isparta cover --report text --report html node_modules/mocha/bin/_mocha -- --reporter dot   

douglasduteil/study-node-path-es6 demo the working cli

With Karma

To use isparta, set the instrumenter for the JavaScript file type to isparta.

coverageReporter: {
  // configure the reporter to use isparta for JavaScript coverage
  // Only on { "karma-coverage": "douglasduteil/karma-coverage#next" }
  instrumenters: { isparta : require('isparta') },
  instrumenter: {
    '**/*.js': 'isparta'
  }
}

But can customize the babel options thanks to my fork


// Note that you ".babelrc" will be the default options for babel.
var babelMoreOptions = { presets: 'es2015' };

// [...]

coverageReporter: {
  // configure the reporter to use isparta for JavaScript coverage
  // Only on { "karma-coverage": "douglasduteil/karma-coverage#next" }
  instrumenters: { isparta : require('isparta') },
  instrumenter: {
    '**/*.js': 'isparta'
  },
  instrumenterOptions: {
    isparta: { babel : babelMoreOptions }
  }
}

License

Copyright © 2014 Douglas Duteil <douglasduteil@gmail.com>
This work is free. You can redistribute it and/or modify it under the
terms of the Do What The Fuck You Want To Public License, Version 2,
as published by Sam Hocevar. See the LICENCE file for more details.

Current Tags

  • 4.1.1                                ...           latest (6 years ago)

35 Versions

  • 4.1.1                                ...           6 years ago
  • 4.1.0                                ...           6 years ago
  • 4.0.0                                ...           9 years ago
  • 3.5.3                                ...           9 years ago
  • 3.5.2                                ...           9 years ago
  • 3.5.1                                ...           9 years ago
  • 3.5.0                                ...           9 years ago
  • 3.4.0                                ...           9 years ago
  • 3.3.0                                ...           9 years ago
  • 3.2.0                                ...           9 years ago
  • 3.1.0                                ...           9 years ago
  • 3.0.4                                ...           9 years ago
  • 3.0.3                                ...           10 years ago
  • 3.0.2                                ...           10 years ago
  • 3.0.1                                ...           10 years ago
  • 3.0.0                                ...           10 years ago
  • 2.2.0                                ...           10 years ago
  • 2.1.0                                ...           10 years ago
  • 2.0.0                                ...           10 years ago
  • 1.4.2                                ...           10 years ago
  • 1.4.1                                ...           10 years ago
  • 1.4.0                                ...           10 years ago
  • 1.3.0                                ...           10 years ago
  • 1.2.0                                ...           10 years ago
  • 1.1.0                                ...           10 years ago
  • 1.0.1                                ...           10 years ago
  • 1.0.0                                ...           10 years ago
  • 0.4.1                                ...           10 years ago
  • 0.4.0                                ...           10 years ago
  • 0.3.1                                ...           10 years ago
  • 0.3.0                                ...           10 years ago
  • 0.2.0                                ...           10 years ago
  • 0.1.2                                ...           10 years ago
  • 0.1.1                                ...           10 years ago
  • 0.1.0                                ...           10 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (9)
Dev Dependencies (10)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |