开玩笑酵素|无法打开反应单元测试LCov报告

时间:2020-07-06 13:26:04

标签: javascript reactjs unit-testing jestjs enzyme

我正在使用以下脚本打开Icov Jest /酶单元测试报告:

"open-coverage": "jest open coverage/lcov-report/index.html --config jest.config.json"

在我的rootDir中创建了一个覆盖文件夹。 但是当我运行开放式覆盖脚本时出现以下错误:

C:\Sagar work\React\without-redux\Azure repo>npm run open-coverage

> data-direct@1.0.0 open-coverage C:\Sagar work\React\without-redux\Azure repo\
> jest open coverage/lcov-report/index.html --config jest.config.json

No tests found, exiting with code 1
Run with `--passWithNoTests` to exit with code 0
In C:\Sagar work\React\without-redux\Azure repo\
  125 files checked.
  testMatch: **/__tests__/**/?(*.)+(test).js?(x) - 14 matches
  testPathIgnorePatterns: Office, node_modules, C:\\Sagar work\\React\\without-redux\\Azure repo\\app\\src\\styles, C:\\Sagar work\\React\\without-redux\\Azure repo\\app\\images - 122 matches
  testRegex:  - 0 matches
Pattern: open|coverage\\lcov-report\\index.html - 0 matches
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! data-direct@1.0.0 open-coverage: `jest open coverage/lcov-report/index.html --config jest.config.json`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the data-direct@1.0.0 open-coverage script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\SNG9\AppData\Roaming\npm-cache\_logs\2020-07-06T13_18_59_071Z-debug.log

有人可以帮助打开icov-report吗?花很多时间打开报告。

0 个答案:

没有答案