From: Jérôme Benoit Date: Thu, 18 Feb 2021 16:21:36 +0000 (+0100) Subject: Use a configuration file for mocha ut X-Git-Tag: v2.0.0-beta.2~2^2 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=bf0dd49de090a34ec0dc6151772a0e631ca7e801;p=poolifier.git Use a configuration file for mocha ut Signed-off-by: Jérôme Benoit --- diff --git a/.mocharc.json b/.mocharc.json new file mode 100644 index 00000000..aa7764dd --- /dev/null +++ b/.mocharc.json @@ -0,0 +1,8 @@ +{ + "diff": true, + "package": "./package.json", + "timeout": 20000, + "full-trace": true, + "exit": true, + "require": ["source-map-support/register"] +} diff --git a/package.json b/package.json index 33b1ebe9..02f1a52b 100644 --- a/package.json +++ b/package.json @@ -9,9 +9,9 @@ "benchmark": "npm run build && node -r source-map-support/register benchmarks/bench.js", "benchmark:debug": "npm run build && node -r source-map-support/register --inspect benchmarks/bench.js", "benchmark:prod": "npm run build:prod && node -r source-map-support/register benchmarks/bench.js", - "test": "npm run build && nyc mocha -r source-map-support/register --exit --timeout 20000 --parallel 'tests/**/*.test.js'", - "test:debug": "npm run build && mocha -r source-map-support/register --inspect --exit --timeout 20000 'tests/**/*.test.js'", - "test:prod": "npm run build:prod && nyc mocha -r source-map-support/register --exit --timeout 20000 'tests/**/*.test.js'", + "test": "npm run build && nyc mocha --parallel 'tests/**/*.test.js'", + "test:debug": "npm run build && mocha --inspect 'tests/**/*.test.js'", + "test:prod": "npm run build:prod && nyc mocha --parallel 'tests/**/*.test.js'", "sonar": "sonar-scanner", "coverage": "nyc report --reporter=lcov", "coverage:html": "nyc report --reporter=html",