buster extension for istanbul code coverage.
busterjs coverage extension
Add buster-istanbul as a dependency in your package.json file.
Configure buster to use buster-istanbul as extension
moduleexportstests =environment: "node"rootPath : "./"sources:"src/**/*.js"tests :"test/**/*-test.js""buster-istanbul":outputDirectory: "coverage"format: "lcov"excludes: "**/*.json"extensions:;
Buster JS options
sources will be the files that will be instrumented.
outputDirectory is path to where the files will be written to.
Defaults to the current working directory.
format is a string or a list of formats to generate.
Currently supported formats:
if text and text-summary formats are given, coverage.txt and coverage-summary.txt files will be generated besides being output to the console at the same time.
silent is a flag to turn off reporting at the end of the test run.
Valid values is
false. Defaults to
instrument is a flag to turn off instrumentation of your source file.
You will need to handle this yourself. Defaults to
excludes is an array of glob paths that will be excluded from instrumentation.
This can be helpful if your sources include non-js files that needed to be excluded, such as .html or .json files.
Consult node-glob for more information on globs.
Write your buster test as usual.
Example project: buster-istanbul-demo
Copyright (c) 2013 kates
Licensed under the MIT license.