Instanbul coverage reporting for projects being tested by web-component-tester
Switch branches/tags
Clone or download
Pull request Compare This branch is 48 commits behind thedeeno:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
.gitignore
README.md
package.json

README.md

Web-Component-Tester-Istanbul

Istanbul coverage plugin for web-component-tester.

Use this plugin to collect and report test coverage (via istanbul) for your project on each test run.

Installation

npm install web-component-tester-istanbul --saveDev

Usage

Add the following configuration to web-component-tester's config file.

Note: this requires the following pull requests to be merged:

https://github.com/Polymer/web-component-tester/pull/62

Example

module.exports = {
  plugins: {
    "web-component-tester-istanbul": {

      dir: "./coverage",

      reporters: ["text-summary", "lcov"],

      include: [
        "**/*.js"
      ],

      exclude: [
        "/polymer/polymer.js"
        "/platform/platform.js"
      ]

    }
  }
}

Options

Below are the available configuration options:

dir

The directory to write coverage reports to.

reporters

An array of istanbul reporters to use.

include

Files to include in instrumentation.

exclude

Files to exclude from instrumentation (this trumps files 'included' with the option above).