我正在用玩笑在我的ReactJS应用程序中编写测试。到目前为止,要运行我的测试套件,我需要输入'npm test'
。
这是package.npm的片段:
"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也不可能吗?
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句