【发布时间】:2015-04-27 19:15:27
【问题描述】:
我正在使用jest 在我的 ReactJS 应用程序中编写测试。
到目前为止,要运行我的测试套件,我需要输入'npm test'。
这是来自 package.npm 的 sn-p:
"scripts": {
"test": "./node_modules/.bin/jest",
(other stuff)
},
"jest": {
"unmockedModulePathPatterns": ["<rootDir>/node_modules/react"],
"scriptPreprocessor": "<rootDir>/node_modules/babel-jest",
"testFileExtensions": [
"es6",
"js"
],
"moduleFileExtensions": [
"js",
"json",
"es6"
]
},
是否可以直接在我的 IDE (IDEA/WebStorm) 中运行这些测试,同时保留配置?我不是 js 人,但例如 WebStrom 与 Karma 完美配合。 jest-cli 也不应该这样吗?
【问题讨论】:
标签: unit-testing intellij-idea reactjs webstorm jestjs