JSPM

  • Created
  • Published
  • Downloads 18562
  • Score
    100M100P100Q137375F
  • License WTFPL

A code coverage tool for ES6 (6to5)

Package Exports

  • isparta
  • isparta/package.json

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (isparta) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

isparta

Isparta is a code coverage tool for ES6 using the 6to5.

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

Installation

For the moment, a custom fork of karma-coverage needs to be installed which supports isparta is an instrumenter.

$ npm install --save-dev douglasduteil/karma-coverage#next

Isparta can be installed using

$ npm install --save-dev douglasduteil/isparta

Usage

isparta cover src/foo.es6.js
istanbul report text-summary

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

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
  instrumenters: { isparta : require('isparta') },
  instrumenter: {
    '**/*.js': 'isparta'
  }
}

But can customize the 6to5 options

coverageReporter: {
  // configure the reporter to use isparta for JavaScript coverage
  instrumenters: { isparta : require('isparta') },
  instrumenter: {
    '**/*.js': 'isparta'
  },
  instrumenterOptions: {
    isparta: {
      to5: {
        options: {
          modules: 'umd'
        }
      }
    }
  }
}

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.