Skip to content

Commit

Permalink
Move Mocha settings to a config file
Browse files Browse the repository at this point in the history
This allows to easily invoke Mocha alone via `npx mocha`, or for e.g. VSCode Test Explorer to find & run tests with the correct settings automatically.
  • Loading branch information
RReverser committed Nov 10, 2022
1 parent 1c9455e commit 8079cf1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .mocharc.jsonc
@@ -0,0 +1,6 @@
{
"parallel": true,
"slow": 1000,
"timeout": 30000,
"spec": "./test/unit/*.js"
}
3 changes: 1 addition & 2 deletions package.json
Expand Up @@ -92,7 +92,7 @@
"clean": "rm -rf node_modules/ build/ vendor/ .nyc_output/ coverage/ test/fixtures/output.*",
"test": "npm run test-lint && npm run test-unit && npm run test-licensing",
"test-lint": "semistandard && cpplint",
"test-unit": "nyc --reporter=lcov --reporter=text --check-coverage --branches=100 mocha --parallel --slow=1000 --timeout=30000 ./test/unit/*.js",
"test-unit": "nyc --reporter=lcov --reporter=text --check-coverage --branches=100 mocha",
"test-licensing": "license-checker --production --summary --onlyAllow=\"Apache-2.0;BSD;ISC;MIT\"",
"test-leak": "./test/leak/leak.sh",
"docs-build": "documentation lint lib && node docs/build && node docs/search-index/build",
Expand Down Expand Up @@ -139,7 +139,6 @@
"tunnel-agent": "^0.6.0"
},
"devDependencies": {
"@tybys/emnapi": "^0.19.2",
"async": "^3.2.4",
"cc": "^3.0.1",
"documentation": "^14.0.0",
Expand Down

0 comments on commit 8079cf1

Please sign in to comment.