From 921550e3ed1b06a8efa2630435d3712f1ee487bb Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Sun, 10 Dec 2017 17:49:23 +0100 Subject: [PATCH] Make mocha call process.exit for each run to avoid lingering server instances --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 4ac95f15a..3dbe10fcf 100644 --- a/package.json +++ b/package.json @@ -104,8 +104,8 @@ "scripts": { "migrate_local": "DATABASE_URL=mysql://root:@localhost/box node_modules/.bin/db-migrate up", "migrate_test": "BOX_ENV=test DATABASE_URL=mysql://root:@localhost/boxtest node_modules/.bin/db-migrate up", - "test": "npm run migrate_test && src/test/setupTest && BOX_ENV=test ./node_modules/istanbul/lib/cli.js test $1 ./node_modules/mocha/bin/_mocha -- -R spec ./src/test ./src/routes/test/[^a]*", - "test_all": "npm run migrate_test && src/test/setupTest && BOX_ENV=test ./node_modules/istanbul/lib/cli.js test $1 ./node_modules/mocha/bin/_mocha -- -R spec ./src/test ./src/routes/test", + "test": "npm run migrate_test && src/test/setupTest && BOX_ENV=test ./node_modules/istanbul/lib/cli.js test $1 ./node_modules/mocha/bin/_mocha -- --exit -R spec ./src/test ./src/routes/test/[^a]*", + "test_all": "npm run migrate_test && src/test/setupTest && BOX_ENV=test ./node_modules/istanbul/lib/cli.js test $1 ./node_modules/mocha/bin/_mocha -- --exit -R spec ./src/test ./src/routes/test", "postmerge": "/bin/true", "precommit": "/bin/true", "prepush": "npm test",