diff options
Diffstat (limited to 'node_modules/nyc/lib/config-util.js')
-rw-r--r-- | node_modules/nyc/lib/config-util.js | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/node_modules/nyc/lib/config-util.js b/node_modules/nyc/lib/config-util.js index 62d057a3f..e355d8720 100644 --- a/node_modules/nyc/lib/config-util.js +++ b/node_modules/nyc/lib/config-util.js @@ -14,7 +14,7 @@ var Config = {} Config.loadConfig = function (argv, cwd) { cwd = cwd || process.env.NYC_CWD || process.cwd() var pkgPath = findUp.sync('package.json', {cwd: cwd}) - var rcPath = findUp.sync('.nycrc', {cwd: cwd}) + var rcPath = findUp.sync(['.nycrc', '.nycrc.json'], {cwd: cwd}) var rcConfig = null if (rcPath) { @@ -93,6 +93,10 @@ Config.buildYargs = function (cwd) { default: 0, description: 'what % of statements must be covered?' }) + .option('per-file', { + default: false, + description: 'check thresholds per file' + }) .example('$0 check-coverage --lines 95', "check whether the JSON in nyc's output folder meets the thresholds provided") }) .option('reporter', { @@ -195,6 +199,12 @@ Config.buildYargs = function (cwd) { description: 'should nyc detect and handle source maps?', global: false }) + .option('per-file', { + default: false, + type: 'boolean', + description: 'check thresholds per file', + global: false + }) .option('produce-source-map', { default: false, type: 'boolean', @@ -234,7 +244,7 @@ Config.buildYargs = function (cwd) { .example('$0 npm test', 'instrument your tests with coverage') .example('$0 --require babel-core/register npm test', 'instrument your tests with coverage and babel') .example('$0 report --reporter=text-lcov', 'output lcov report after running your tests') - .epilog('visit https://git.io/voHar for list of available reporters') + .epilog('visit https://git.io/vHysA for list of available reporters') .boolean('help') .boolean('h') .boolean('version') |