diff --git a/.mocharc-default.yml b/.mocharc-default.yml new file mode 100644 index 00000000..1bb8bf6d --- /dev/null +++ b/.mocharc-default.yml @@ -0,0 +1 @@ +# empty diff --git a/.mocharc-unit.yml b/.mocharc-unit.yml new file mode 100644 index 00000000..c19fe15a --- /dev/null +++ b/.mocharc-unit.yml @@ -0,0 +1,11 @@ +require: + - source-map-support/register +spec: + - out/**/*.test.js + - addons/**/out/*.test.js +watch-files: + - out/**/*.js + - addons/**/out/*.js +reporter: spec +color: true +check-leaks: true diff --git a/.vscode/settings.json b/.vscode/settings.json index 9fa94d5f..55a15a6a 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,6 @@ { "typescript.preferences.importModuleSpecifier": "non-relative", "typescript.preferences.quoteStyle": "single", - "mochaExplorer.envPath": ".mocha.env" + "mochaExplorer.envPath": ".mocha.env", + "mochaExplorer.configFile": ".mocharc-unit.yml" } diff --git a/bin/test.js b/bin/test.js index b9725acd..e8416d38 100644 --- a/bin/test.js +++ b/bin/test.js @@ -17,7 +17,9 @@ let testFiles = [ './addons/**/out/*test.js', ]; -let flagArgs = []; +let flagArgs = [ + '--config', ".mocharc-default.yml" +]; if (process.argv.length > 2) { const args = process.argv.slice(2); diff --git a/bin/test_api.js b/bin/test_api.js index ff166727..bbf11bff 100644 --- a/bin/test_api.js +++ b/bin/test_api.js @@ -17,7 +17,9 @@ let testFiles = [ ]; -let flagArgs = []; +let flagArgs = [ + '--config', ".mocharc-default.yml" +]; if (process.argv.length > 2) { const args = process.argv.slice(2);