Skip to content

aaronabramov/test-exclude

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

test-exclude

The file include/exclude logic used by nyc.

Build Status Coverage Status Standard Version

Usage

const exclude = require('test-exclude')
if (exclude().shouldInstrument('./foo.js')) {
  // let's instrument this file for test coverage!
}

you can load configuration from a key in package.json:

package.json

{
  "name": "awesome-module",
  "test": {
    "include": ["**/index.js"]
  }
}

app.js

const exclude = require('test-exclude')
if (exclude({configKey: 'test'}).shouldInstrument('./index.js')) {
  // let's instrument this file for test coverage!
}

License

ISC

About

test for inclusion or exclusion of paths using pkg-conf and globs

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%