I recently switched from Mocha to Jest. Everything works fine except the watch mode which always runs all tests (not only tests related to uncommited files as it says in the docs). I ve searched the docs and with google but I haven t found any information on this issue.
我的 j是
"jest": {
"coveragePathIgnorePatterns": [
"/node_modules/",
"/generated/",
"/mock/",
"/tools/",
"/transactions/"
],
"coverageThreshold": {
"global": {
"branches": 90,
"functions": 90,
"lines": 90,
"statements": 90
}
},
"resetMocks": true,
"moduleDirectories": [
"node_modules",
"src"
],
"moduleNameMapper": {
"\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/src/__mocks__/fileMock.js",
"\.(css|less|scss)$": "<rootDir>/src/__mocks__/styleMock.js"
},
"setupTestFrameworkScriptFile": "<rootDir>/tools/setupTest.js"
},
http://www.un.org/Depts/DGACM/index_french.htm 页: 1
require( babel-polyfill );
Babelrc:
"env": {
"test": {
"plugins": [
"rewire",
"transform-class-properties",
"transform-es2015-modules-commonjs"
],
"presets": [
"es2017",
"react",
"stage-0",
"es2015"
]
}
}
我开始用<代码>jest-watch进行测试,并打印“确定操作的试验程序”的讯息,但所有测试都在,即使没有任何文件未经编辑<>。
I m on windows 7 and I run the command in powershell. Node version: v6.9.1
Jest versions: "babel-jest": "20.0.3"
, "jest": "20.0.4"