Skip to content

Commit

Permalink
fix(tests): Make .mocharc.js CWD-independent (#7329)
Browse files Browse the repository at this point in the history
Move tests/browser/test/.mocharc.js to tests/browser and use
__dirname to make the require directive work regardless of where
mocha is invoked from.

Simplify the browser:test script accordingly, taking advantage
also of the mocha default of running all tests in the test/
subdirectory.
  • Loading branch information
cpcallen authored Jul 31, 2023
1 parent 1fe82b2 commit 8893107
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"start": "npm run build && concurrently -n tsc,server \"tsc --watch --preserveWatchOutput --outDir 'build/src' --declarationDir 'build/declarations'\" \"http-server ./ -s -o /tests/playground.html -c-1\"",
"tsc": "gulp tsc",
"test": "gulp test",
"test:browser": "npx mocha ./tests/browser/test --config ./tests/browser/test/.mocharc.js",
"test:browser": "cd tests/browser && npx mocha",
"test:generators": "gulp testGenerators",
"test:mocha:interactive": "http-server ./ -o /tests/mocha/index.html -c-1",
"test:compile:advanced": "gulp buildAdvancedCompilationTest --debug",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

module.exports = {
ui: 'tdd',
require: 'tests/browser/test/hooks.js',
require: __dirname + '/test/hooks.js',
};

0 comments on commit 8893107

Please sign in to comment.