.example('$0 check-coverage --lines 95',"check whether the JSON in nyc's output folder meets the thresholds provided")
})
.option('reporter',{
alias:'r',
describe:'coverage reporter(s) to use',
default:'text',
globa:false
})
.option('report-dir',{
describe:'directory to output coverage reports in',
default:'coverage',
global:false
})
.option('silent',{
alias:'s',
default:false,
type:'boolean',
describe:"don't output a report after tests finish running",
global:false
})
.option('all',{
alias:'a',
default:false,
type:'boolean',
describe:'whether or not to instrument all files of the project (not just the ones touched by your test suite)',
global:false
})
.option('exclude',{
alias:'x',
default:testExclude.defaultExclude,
describe:'a list of specific files and directories that should be excluded from coverage, glob patterns are supported, node_modules is always excluded',
global:false
})
.option('include',{
alias:'n',
default:[],
describe:'a list of specific files that should be covered, glob patterns are supported',
global:false
})
.option('require',{
alias:'i',
default:[],
describe:'a list of additional modules that nyc should attempt to require in its subprocess, e.g., babel-register, babel-polyfill.',
global:false
})
.option('eager',{
default:false,
type:'boolean',
describe:'instantiate the instrumenter at startup (see https://git.io/vMKZ9)',
global:false
})
.option('cache',{
alias:'c',
default:true,
type:'boolean',
describe:'cache instrumentation results for improved performance',
global:false
})
.option('babel-cache',{
default:false,
type:'boolean',
describe:'cache babel transpilation results for improved performance',
global:false
})
.option('extension',{
alias:'e',
default:[],
describe:'a list of extensions that nyc should handle in addition to .js',
global:false
})
.option('check-coverage',{
type:'boolean',
default:false,
describe:'check whether coverage is within thresholds provided',
global:false
})
.option('branches',{
default:0,
description:'what % of branches must be covered?',
global:false
})
.option('functions',{
default:0,
description:'what % of functions must be covered?',
global:false
})
.option('lines',{
default:90,
description:'what % of lines must be covered?',
global:false
})
.option('statements',{
default:0,
description:'what % of statements must be covered?',
global:false
})
.option('source-map',{
default:true,
type:'boolean',
description:'should nyc detect and handle source maps?',