Skip to content

Commit

Permalink
Adding possibility to force exit after test run (#229)
Browse files Browse the repository at this point in the history
* Adding possibility to force exit after test run

* feat: fix `exit`

* chore: update description
  • Loading branch information
axelssonHakan authored and stoffeastrom committed May 24, 2018
1 parent 72443a5 commit 2c7b489
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/node/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ class Runner {
process.on('exit', () => {
process.exit(failures);
});
if (this.argv.exit) {
process.exit();
}
}
onEnd() {
if (this.argv.coverage) {
Expand Down
5 changes: 5 additions & 0 deletions src/node/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ module.exports = {
default: false,
type: 'boolean',
},
exit: {
description: 'Force its own process to exit once it was finished executing all tests',
default: false,
type: 'boolean',
},
'mocha.reporter': {
description: 'Which reporter to use',
default: undefined,
Expand Down

0 comments on commit 2c7b489

Please sign in to comment.