笑话 – 有没有办法检查testing覆盖率的百分比?
我用下面的命令来运行我的testing,并得到一个覆盖报告:
jest --coverage
现在我想检查我的脚本文件中覆盖百分比是否超过90%。 我该怎么办 ?
尝试使用这个选项
https://facebook.github.io/jest/docs/configuration.html#coveragethreshold-object
{ ... "jest": { "coverageThreshold": { "global": { "branches": 50, "functions": 50, "lines": 50, "statements": 50 } } } }
- 使用SinonJS存根(与rewire)
- 用Mocha和SupertesttestingExpress错误
- Benchmarkt socket.io
- 使用Gulp,Mocha,Browserify进行正确configuration,以执行服务器端testing的客户端testing
- 节点RESTful APItesting
- Node.js编程工作stream程 – testing,代码,testing
- 为什么使用supertest代替expressJS的unit testing?
- JSunit testing:对文件更改运行testing(如nodemon)
- 在Express.js中redirect后调用下一个中间件