Skip to content

Commit

Permalink
linagora/lgs/openpaas/esn#2790 add 'exit' flag with value true for mo…
Browse files Browse the repository at this point in the history
…chacli options

To force shutdown of the event loop after test run

From v4.0.0, grunt-mocha-cli use mocha v4.0.0 which no logger use '--no-exit' flag

By default, Mocha will no longer force the process to exit once all tests complete. This means any test code (or code under test) which would normally prevent node from exiting will do so when run in Mocha. Supply the --exit flag to revert to pre-v4.0.0 behavior

Check breaking change: https://github.com/mochajs/mocha/releases/tag/v4.0.0

The reported Github issue: mochajs/mocha#2879
  • Loading branch information
Tuan Tuan LE committed Aug 14, 2019
1 parent b58c123 commit ecad12b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ module.exports = function(grunt) {
options: {
require: ['chai', 'mockery'],
reporter: 'spec',
timeout: process.env.TEST_TIMEOUT || 20000
timeout: process.env.TEST_TIMEOUT || 20000,
exit: true
},
backend: {
options: {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"karma-phantomjs-launcher": "1.0.4",
"karma-spec-reporter": "0.0.26",
"linagora-rse": "github:linagora/openpaas-esn#master",
"mocha": "5.2.0",
"mocha": "6.2.0",
"mockery": "1.7.0",
"mongodb": "2.2.9",
"phantomjs-prebuilt": "2.1.16",
Expand All @@ -56,7 +56,7 @@
"sinon": "1.17.5",
"sinon-chai": "2.8.0",
"superagent": "5.1.0",
"supertest": "2.0.0",
"supertest": "4.0.0",
"time-grunt": "1.4.0"
},
"scripts": {
Expand Down

0 comments on commit ecad12b

Please sign in to comment.