isparta

4.1.1last stable release 6 years ago
Complexity Score
Low
Open Issues
41
Dependent Projects
3,145
Weekly Downloadsglobal
8,383

License

  • WTFPL
    • Noattribution
    • PublicDomainlinking
    • PublicDomaindistribution
    • PublicDomainmodification
    • Nopatent grant
    • Yesprivate use
    • PublicDomainsublicensing
    • Notrademark grant

Downloads

Readme

:skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull:



Deprecated for istanbuljs/nyc



:skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull::skull:





isparta

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.

Dependencies

CVE IssuesActive
0
Scorecards Score
3.00
Test Coverage
No Data
Follows Semver
Yes
Github Stars
642
Dependenciestotal
19
DependenciesOutdated
7
DependenciesDeprecated
0
Threat Modelling
No
Repo Audits
No

Learn how to distribute isparta in your own private NPM registry

npm config set registry  https://npm.cloudsmith.com/owner/repo
Processing...
Done
npm install isparta
Processing...
Done

35 Releases

NPM on Cloudsmith

Getting started with NPM on Cloudsmith is fast and easy.