是否有任何选项可以通过 Jest 详细输出进行测试?
我可以看到模拟了哪些模块。
我试过
jasmine.VERBOSE = true;
但不工作。
感谢您的回答。
最佳答案
要在 Jest 中获得详细模式,您可以使用 --verbose
运行 Jest标签。
在您的 packages.json
, 你可以写:
"scripts": {
"test": "jest --verbose"
},
然后你可以运行
npm test
或者,如果您使用
gulp-jest
, 要让 Jest 进入详细模式,请找到 index.js
gulp-jest
的文件node_modules
中的文件夹并在 jest.runCLI
中添加 verbose: true堵塞。jest.runCLI({
config: options,
verbose: true
}
关于unit-testing - jest js中的详细输出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30427974/