[英]how to write unit test case for following code snippet
export { className } from "path";
export { className1} from "path";
export { className2 } from "path";
export { className3 } from "path";
这个文件只包含以上几行,我们是否应该为这些文件编写单元测试用例,如果是,请建议如何为此编写单元测试用例。
提前致谢
无需为仅导出某些内容的文件编写测试。 如果你有一个coverageThreshold
就忽略这些文件
// jest.config.js
module.exports = {
...
collectCoverage: true,
collectCoverageFrom: [
'path/to/collect/**',
'!path/to/ignore/**',
],
coverageThreshold: {
global: {
...
},
},
};
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.