作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
-6ren">
我正在尝试在我的 Windows 10 台式计算机上使用 Jest,但它一直告诉我没有找到任何测试。在我的 Windows 10 笔记本电脑上,它工作得很好。这是我在桌面上得到的输出:
C:\app> jest
No tests found
In C:\app
25163 files checked.
testMatch: **/__tests__/**/*.js?(x),**/?(*.)(spec|test).js?(x) - 743 matches
testPathIgnorePatterns: \\node_modules\\ - 25163 matches
Pattern: "" - 0 matches
"jest": {
"collectCoverageFrom": [
"app/**/*.{js,jsx}",
"!app/**/*.test.{js,jsx}",
"!app/*/RbGenerated*/*.{js,jsx}",
"!app/app.js"
],
"coverageThreshold": {
"global": {
"statements": 98,
"branches": 91,
"functions": 98,
"lines": 98
}
},
"moduleDirectories": [
"node_modules",
"app",
"common"
],
"moduleNameMapper": {
".*\\.(css|less|styl|scss|sass)$": "<rootDir>/internals/mocks/cssModule.js",
".*\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/internals/mocks/image.js"
},
"setupTestFrameworkScriptFile": "<rootDir>/internals/testing/test-bundler.js"
}
最佳答案
我不是 100% 确定它是同一个问题。但是对我来说解决它的是摆脱守望者(我将它添加到另一个使用中继的项目的路径中)。尝试使用 --no-watchman 运行(或在 jest 配置中设置 watchman: false )
关于jestjs - 如何在 Windows 10 上修复 Jest "No Tests Found"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45132566/
我是一名优秀的程序员,十分优秀!