Skip to content

Commit 8893107

Browse files
authored
fix(tests): Make .mocharc.js CWD-independent (#7329)
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.
1 parent 1fe82b2 commit 8893107

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"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\"",
5252
"tsc": "gulp tsc",
5353
"test": "gulp test",
54-
"test:browser": "npx mocha ./tests/browser/test --config ./tests/browser/test/.mocharc.js",
54+
"test:browser": "cd tests/browser && npx mocha",
5555
"test:generators": "gulp testGenerators",
5656
"test:mocha:interactive": "http-server ./ -o /tests/mocha/index.html -c-1",
5757
"test:compile:advanced": "gulp buildAdvancedCompilationTest --debug",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

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

0 commit comments

Comments
 (0)