Socket
Socket
Sign inDemoInstall

buster-istanbul

Package Overview
Dependencies
65
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    buster-istanbul

buster extension for istanbul code coverage.


Version published
Weekly downloads
7
Maintainers
1
Install size
8.48 MB
Created
Weekly downloads
 

Readme

Source

buster-istanbul

busterjs coverage extension

Getting Started

Add buster-istanbul as a dependency in your package.json file.

{
  "name": "awesome name",
  ...
  "dependencies": {
    "buster-istanbul": "*"
  }
}

Configure buster to use buster-istanbul as extension

module.exports.tests = {
    environment: "node",

    rootPath : "./",
    sources: [
        "src/**/*.js"
    ],
    tests : [
       "test/**/*-test.js"
    ],
    "buster-istanbul": {
      outputDirectory: "coverage",
      format: "lcov",
      excludes: ["**/*.json"]
    },
    extensions: [
        require('buster-istanbul')
    ]
};

Buster JS options

sources will be the files that will be instrumented.

buster-istanbul options

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:

  • lcov
  • cobertura
  • json
  • text
  • text-summary

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 true or false. Defaults to false.

instrument is a flag to turn off instrumentation of your source file. You will need to handle this yourself. Defaults to true.

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

License

Copyright (c) 2013 kates
Licensed under the MIT license.

Keywords

FAQs

Last updated on 20 Apr 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc