mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2024-12-22 01:58:54 +00:00
More test:watch fixes & usability
See https://github.com/nativefier/nativefier/pull/1204#issuecomment-852679403
This commit is contained in:
parent
9c5dba7f07
commit
6b09d1467f
@ -1,5 +1,7 @@
|
||||
const path = require('path');
|
||||
|
||||
// Q: Why do you use webpack?
|
||||
// A: https://github.com/nativefier/nativefier/commit/cde5c1e13bdc2739604cab04bac64eae0d719ed1
|
||||
module.exports = {
|
||||
target: 'node',
|
||||
entry: './src/main.ts',
|
||||
|
17
package.json
17
package.json
@ -34,7 +34,7 @@
|
||||
"build-app": "cd app && webpack",
|
||||
"build-app-static": "ncp app/src/static/ app/lib/static/ && ncp app/dist/preload.js app/lib/preload.js && ncp app/dist/preload.js.map app/lib/preload.js.map",
|
||||
"build": "npm run clean && tsc --build . app && npm run build-app && npm run build-app-static",
|
||||
"build:watch": "tsc --build . app --watch",
|
||||
"build:watch": "npm run clean && tsc --build . app --watch",
|
||||
"changelog": "./.github/generate-changelog",
|
||||
"ci": "npm run lint && npm test",
|
||||
"clean": "rimraf lib/ app/lib/ app/dist/",
|
||||
@ -47,7 +47,7 @@
|
||||
"test:integration": "jest --testRegex '.*integration-test.js'",
|
||||
"test:manual": "npm run build && ./.github/manual-test",
|
||||
"test:unit": "jest",
|
||||
"test:watch": "echo 'Remember to run npm run build:watch for the test watcher to work!' && jest --watch",
|
||||
"test:watch": "echo 'Remember to run npm run build:watch for the test watcher to work!' && jest --watchAll --collectCoverage=false",
|
||||
"test:withlog": "LOGLEVEL=trace npm run test",
|
||||
"test": "jest --testRegex '[-.]test\\.js$'",
|
||||
"watch": "npx concurrently \"npm:*:watch\""
|
||||
@ -85,7 +85,7 @@
|
||||
"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`",
|
||||
"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` or `dist`",
|
||||
"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": {
|
||||
@ -95,13 +95,18 @@
|
||||
],
|
||||
"testEnvironment": "node",
|
||||
"testPathIgnorePatterns": [
|
||||
"/node_modules/",
|
||||
"<rootDir>/src.*",
|
||||
"<rootDir>/node_modules.*",
|
||||
"<rootDir>/app/src.*",
|
||||
"<rootDir>/src.*"
|
||||
"<rootDir>/app/dist.*",
|
||||
"<rootDir>/app/node_modules.*"
|
||||
],
|
||||
"watchPathIgnorePatterns": [
|
||||
"<rootDir>/src.*",
|
||||
"<rootDir>/tsconfig.json",
|
||||
"<rootDir>/app/src.*",
|
||||
"<rootDir>/src.*"
|
||||
"<rootDir>/app/dist.*",
|
||||
"<rootDir>/app/tsconfig.json"
|
||||
]
|
||||
},
|
||||
"prettier": {
|
||||
|
Loading…
Reference in New Issue
Block a user