Skip to content

Commit

Permalink
feat: Add test-exclude args to check-coverage and report subcommands.
Browse files Browse the repository at this point in the history
  • Loading branch information
coreyfarrell committed Mar 7, 2019
1 parent 36bcc0b commit 0fc217e
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
19 changes: 19 additions & 0 deletions lib/commands/check-coverage.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const testExclude = require('test-exclude')
const NYC = require('../../index.js')

exports.command = 'check-coverage'
Expand All @@ -6,6 +7,24 @@ exports.describe = 'check whether coverage is within thresholds provided'

exports.builder = function (yargs) {
yargs
.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('exclude-after-remap', {
default: true,
type: 'boolean',
description: 'should exclude logic be performed after the source-map remaps filenames?',
global: false
})
.option('include', {
alias: 'n',
default: [],
describe: 'a list of specific files that should be covered, glob patterns are supported',
global: false
})
.option('branches', {
default: 0,
description: 'what % of branches must be covered?'
Expand Down
19 changes: 19 additions & 0 deletions lib/commands/report.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const testExclude = require('test-exclude')
const NYC = require('../../index.js')

exports.command = 'report'
Expand All @@ -23,6 +24,24 @@ exports.builder = function (yargs) {
.option('temp-directory', {
hidden: true
})
.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('exclude-after-remap', {
default: true,
type: 'boolean',
description: 'should exclude logic be performed after the source-map remaps filenames?',
global: false
})
.option('include', {
alias: 'n',
default: [],
describe: 'a list of specific files that should be covered, glob patterns are supported',
global: false
})
.option('show-process-tree', {
describe: 'display the tree of spawned processes',
default: false,
Expand Down

0 comments on commit 0fc217e

Please sign in to comment.