我在单元测试中使用jest,在一些自动化中使用解毒(使用jest作为测试运行程序)。这是我在package.json中的设置
"jest": {
"preset": "react-native",
"collectCoverage": true,
"coverageReporters": [
"json",
"html"
],
"testPathIgnorePatterns": [
"/node_modules/",
"/.history/",
"/e2e/"
]
},
"detox": {
"test-runner": "jest",
"runner-config": "e2e/config.json",
"configurations": ...
}我想看到合并的代码覆盖,我应该如何做呢?
发布于 2018-01-08 16:51:51
我刚从detox的开发团队那里得到了一个答案,这可能是不可能的
不确定如何通过Detox添加覆盖率,因为测试不会在节点中运行JS代码。相反,它命令设备和应用程序进行操作,然后断言设备/模拟器上的本机视图层次结构发生了变化。 我相信这是不可能的。 link- https://github.com/wix/detox/issues/470
UDPATE:看起来https://github.com/wix/detox/issues/470已经被重新打开了,人们正在积极地致力于使Detox测试覆盖范围成为可能!永远不要说永远不要
https://stackoverflow.com/questions/47913436
复制相似问题