From cba5a2ceedd3f8fb01b39fb38309d72bd3464ffb Mon Sep 17 00:00:00 2001 From: Adam Gruber Date: Thu, 24 Mar 2022 23:07:13 -0400 Subject: [PATCH] fix: run mocha with --exit flag For some reason the tests hang when running on node 16+. Using the `--exit` flag forces mocha to quit after the test run. This is definitely a bandaid but all attempts to find the root cause have so far been unsuccessful. :/ --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1470c06..c0c47da 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "lint": "eslint src test --ext js", "stylelint": "stylelint src/**/*.css src/components/**/*.css", "pretest": "npm run lint", - "test": "cross-env NODE_ENV=test nyc mocha \"test/spec/**/*.test.js\"", + "test": "cross-env NODE_ENV=test nyc mocha \"test/spec/**/*.test.js\" --exit", "tdd": "cross-env NODE_ENV=test nyc mocha --watch \"test/spec/**/*.test.js\"", "test:single": "cross-env NODE_ENV=test nyc mocha ", "test:functional": "cross-env NODE_ENV=test node ./test-functional/index.js",