diff --git a/package.json b/package.json index 43a541e..433acc2 100644 --- a/package.json +++ b/package.json @@ -84,6 +84,10 @@ "webpack": "^5.24.4", "webpack-cli": "^4.5.0" }, + "jest_COMMENTS": { + "testPathIgnorePatterns": "See https://jestjs.io/docs/configuration#testpathignorepatterns-arraystring . We set it to 1. ignore coverage for deps, and 2. be sure we test the compiled JS, which is in `lib`, not `src`", + "watchPathIgnorePatterns": "See https://jestjs.io/docs/configuration#watchpathignorepatterns-arraystring . We set it for `jest --watch` (a.k.a. `npm run test:watch`) to trigger only after `tsc --watch` (a.k.a. `npm run build:watch`) completes its incremental compilation. Else, jest will pick up immediately on changes in `src` when TSC is barely running, hence testing not-recompiled-yet code and being super confusing, as 1. your changes won't be taken during this first run, and 2. the *next* run (e.g. after a second 'Save' in your editor) will actually have the new code :D" + }, "jest": { "collectCoverage": true, "setupFiles": [ @@ -94,6 +98,10 @@ "/node_modules/", "/app/src.*", "/src.*" + ], + "watchPathIgnorePatterns": [ + "/app/src.*", + "/src.*" ] }, "prettier": {