How to use the test-exclude function in test-exclude

To help you get started, we’ve selected a few test-exclude examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github istanbuljs / babel-plugin-istanbul / src / index.js View on Github external
return function shouldSkip (file, nycConfig) {
    if (!exclude || (exclude.cwd !== nycConfig.cwd)) {
      exclude = new TestExclude({
        cwd: nycConfig.cwd,
        include: nycConfig.include,
        exclude: nycConfig.exclude,
        extension: nycConfig.extension,
        // Make sure this is true unless explicitly set to `false`. `undefined` is still `true`.
        excludeNodeModules: nycConfig.excludeNodeModules !== false
      })
    }

    return !exclude.shouldInstrument(file)
  }
}

test-exclude

test for inclusion or exclusion of paths using globs

ISC
Latest version published 4 years ago

Package Health Score

65 / 100
Full package analysis

Popular test-exclude functions