Jestjs 所有测试都通过100%覆盖率,但jest返回退出代码1
我已经研究了Jestjs 所有测试都通过100%覆盖率,但jest返回退出代码1,jestjs,Jestjs,我已经研究了--detectLeaks和--detectOpenHandles,它确实引起了一些错误,但输出中没有明确的问题 我有一个monorepo,我在码头工人/管道内的jenkins里开玩笑 > abide@1.0.0 jest /var/jenkins_home/workspace/abide > jest --coverage --no-cache --runInBand [BABEL] Note: The code generator has deoptimised t
--detectLeaks
和--detectOpenHandles
,它确实引起了一些错误,但输出中没有明确的问题
我有一个monorepo,我在码头工人/管道内的jenkins里开玩笑
> abide@1.0.0 jest /var/jenkins_home/workspace/abide
> jest --coverage --no-cache --runInBand
[BABEL] Note: The code generator has deoptimised the styling of "/var/jenkins_home/workspace/abide/node_modules/lodash/lodash.js" as it exceeds the max of "500KB".
PASS packages/help.parse-argv/index.test.js (10.842s)
[BABEL] Note: The code generator has deoptimised the styling of "/var/jenkins_home/workspace/abide/node_modules/text-encoding/lib/encoding-indexes.js" as it exceeds the max of "500KB".
hello
npm notice created a lockfile as package-lock.json. You should commit this file.
+ example-working@0.0.1
added 2 packages from 2 contributors and audited 2 packages in 2.837s
found 0 vulnerabilities
require successfull
Usage: --function <args> [--function <args>]
--a (echo hi)
--b (echo hi)
--c (echo hi)
--help (shows this help output)
--------------------------------|----------|----------|----------|----------|-------------------|
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
--------------------------------|----------|----------|----------|----------|-------------------|
All files | 100 | 100 | 100 | 100 | |
command | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
command-plus | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
dep-merge | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
dep-merge-cli | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
dep-pointer | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
dep-pointer-cli | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
gitpkg.traverse-up | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
gitpkg.upsert | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
help | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
help.filter-until | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
help.parse-argv | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
help.set-entire | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
help.string-argv | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
here | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
journey | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
journey.coerce-to-array | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
journey.coerce-to-plain-object | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
journey.fn-free | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
journey.fn-reduce | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
journey.pass-thru | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
lerna.paths | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
lerna.utils | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
monorepo-babel-cli | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
monorepo-dep-lint-cli | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
pkg | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
pkg-cli | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
pkg-plugin-babel-6-to-node-4 | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
pkg-plugin-babel-7-to-node-4 | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
pkg-plugin-cobalt | 0 | 0 | 0 | 0 | |
index.js | 0 | 0 | 0 | 0 | |
pkg-plugin-jest | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
pkg-plugin-name-dir | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
pkg-plugin-name-scope | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
pkg-plugin-prop | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
pkg-plugin-sort | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
pkg-plugin-standard | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
pkg.file-exists | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
pkg.fs | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
pkg.is-local-module | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
pkg.json-parse | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
pkg.pretty-json | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
pkg.prop-overwrite | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
pkg.read-json | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
pkg.throw-error | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
pkgprop | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
pkgprop-cli | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
reggi-cli | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
replace-cli | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
requireable | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
requireable-cli | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
results-cli | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
shebang-check | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
shebang-check-cli | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
subrepo | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
subrepo-cli | 100 | 100 | 100 | 100 | |
index.js | 100 | 100 | 100 | 100 | |
--------------------------------|----------|----------|----------|----------|-------------------|
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! abide@1.0.0 jest: `jest --coverage --no-cache --runInBand`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the abide@1.0.0 jest 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! /root/.npm/_logs/2018-06-20T13_11_31_412Z-debug.log
我有一个模块正在调用
process.stderr.write()
我使用lerna逐个运行以找到它
lerna exec --concurrency 1 -- jest --no-cache --runInBand --ci
pkg-plugin-cobalt没有覆盖范围。该模块没有可执行代码,它只是导出一个数组。这就是为什么覆盖率为0。它在本地通过,在jenkins/docker中失败。您可以尝试“jest--coverage--no cache--runInBand | | true”,这应该允许您的作业成功完成(即使它并没有真正解决核心问题)。
Snapshot Summary
› 11 snapshots written from 6 test suites.
Test Suites: 55 passed, 55 total
Tests: 290 passed, 290 total
Snapshots: 11 written, 12 passed, 23 total
Time: 112.189s
Ran all test suites.
> abide@1.0.0 postjest /Users/thomas/Desktop/github.com/reggi/abide
> here --cleanCoverage
lerna exec --concurrency 1 -- jest --no-cache --runInBand --ci