diff --git a/src/index.js b/src/index.js index 13b7de8..4db1729 100644 --- a/src/index.js +++ b/src/index.js @@ -19,9 +19,11 @@ function makeShouldSkip () { return function shouldSkip (file, opts) { if (!exclude) { const cwd = getRealpath(process.env.NYC_CWD || process.cwd()) + const defaults = process.env.NYC_CONFIG ? JSON.parse(process.env.NYC_CONFIG) : {} exclude = testExclude(assign( { cwd }, Object.keys(opts).length > 0 ? opts : { + include: defaults.include, configKey: 'nyc', configPath: dirname(findUp.sync('package.json', { cwd })) }