Skip to content

Commit

Permalink
Fix mocha configuration for watching chanages within test files
Browse files Browse the repository at this point in the history
  • Loading branch information
plesiecki committed Mar 16, 2022
1 parent 5565a1c commit 9147a47
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@
"scripts": {
"test": "npm-run-all -s test:*",
"watch:test": "npm-run-all -p watch:test:*",
"test:common": "mocha --exit --require ./test/setup/mocha.js src/common/**/*.mocha.{ts,tsx}",
"test:client": "mocha --exit --require ./test/setup/mocha.js src/client/**/*.mocha.{ts,tsx}",
"test:server": "mocha --exit --require ./test/setup/mocha.js src/server/**/*.mocha.ts",
"test:common": "mocha --exit --require ./test/setup/mocha.js 'src/common/**/*.mocha.{ts,tsx}'",
"test:client": "mocha --exit --require ./test/setup/mocha.js 'src/client/**/*.mocha.{ts,tsx}'",
"test:server": "mocha --exit --require ./test/setup/mocha.js 'src/server/**/*.mocha.ts'",
"test:client-types": "npm run tsc -- --noEmit -p src/client/tsconfig.json",
"test:size": "size-limit",
"watch:test:common": "npm run test:common -- --watch --watch-extensions ts,tsx",
"watch:test:client": "npm run test:client -- --watch --watch-extensions ts,tsx",
"watch:test:server": "npm run test:server -- --watch --watch-extensions ts,tsx",
"test-watcher": "mocha --require ./test/setup/mocha.js --watch --watch-extensions ts,tsx",
"watch:test:common": "npm run test:common -- --watch --watch-files 'src/common/**/*.mocha.ts'",
"watch:test:client": "npm run test:client -- --file 'src/client/utils/test-utils/jsdom-setup.ts' --watch --watch-files 'src/client/**/*.mocha.tsx' --watch-files 'src/client/**/*.mocha.ts'",
"watch:test:server": "npm run test:server -- --watch --watch-files 'src/server/**/*.mocha.ts'",
"test-watcher": "mocha --require ./test/setup/mocha.js --watch",
"start": "./bin/turnilo",
"start:dev": "NODE_ENV=dev-hmr ./bin/turnilo",
"start:examples": "npm run start -- --examples",
Expand Down
1 change: 0 additions & 1 deletion src/client/utils/test-utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
var ExecutionEnvironment = require("../../../../node_modules/fbjs/lib/ExecutionEnvironment");
ExecutionEnvironment.canUseDOM = true;

import "./jsdom-setup";
import "./require-extensions";

export * from "./mock-require-ensure";
Expand Down

0 comments on commit 9147a47

Please sign in to comment.