js coverage testing
js coverage testing
测试覆盖率
istanbul 伊斯坦堡/伊斯坦布尔
jest coverage
https://jestjs.io/img/content/feature-coverage.png
单元测试
集成测试
jest test
jest
https://jestjs.io/docs/zh-Hans/getting-started.html
$ yarn add -D jest
# OR
$ npm i -D jest
# test
$ yarn test
$ npm test
# $ npm run test
Jest CLI
https://jestjs.io/docs/zh-Hans/cli
$ yarn global add jest
# OR
$ npm i -g jest
# find-the-symmetric-difference.js
# find-the-symmetric-difference.test.js
$ jest find-the-symmetric-difference --notify --config=config.json
$ jest find-the-symmetric-difference --notify --config=config.json
# ❌ bug
# Error: Can't find a root directory while resolving a config file path.
# Provided path to resolve: config.json
$ jest find-the-symmetric-difference --notify
# $ jest ./find-the-symmetric-difference --notify
refs
©xgqfrms 2012-2020
www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/13577191.html
未经授权禁止转载,违者必究!