Skip to content

Commit

Permalink
feat: aegir test --100 for full coverage validation (#360)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeal authored and hugomrdias committed Jul 12, 2019
1 parent 988d40a commit 690c459
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmds/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ module.exports = {
'Debug electron renderer test with a persistent window.'
)
.options({
'100': {

This comment has been minimized.

Copy link
@achingbrain

achingbrain Sep 10, 2019

Member

Still wish this was aegir test --💯

describe: 'Check coverage and validate 100% was covered.',
type: 'boolean',
default: false
},
target: {
alias: 't',
describe: 'In which target environment to execute the tests',
Expand Down
12 changes: 12 additions & 0 deletions src/test/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,18 @@ function testNode (ctx) {

let err

if (ctx['100']) {
args = [
'--check-coverage',
'--branches=100',
'--functions=100',
'--lines=100',
'--statements=100',
exec
].concat(args)
exec = 'nyc'
}

return preHook(ctx).then(() => {
return execa(exec, args.concat(files.map((p) => path.normalize(p))), {
env: env,
Expand Down

0 comments on commit 690c459

Please sign in to comment.