Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: file without exports cause coverage collection error #3916

Open
guoyunhe opened this issue Nov 30, 2022 · 0 comments
Open

[Bug]: file without exports cause coverage collection error #3916

guoyunhe opened this issue Nov 30, 2022 · 0 comments
Labels
🐛 Bug Confirmed Bug is confirmed

Comments

@guoyunhe
Copy link

guoyunhe commented Nov 30, 2022

Version

29.0.3

Steps to reproduce

  1. clone https://github.com/guoyunhe/ts-jest-empty-file
  2. npm install
  3. npm test

Expected behavior

Test coverage success

Actual behavior

Test coverage fail with:

Debug log

Failed to collect coverage from /Users/guoyunhe/Git/test-jest-empty-file/src/other.ts
ERROR: Jest worker encountered 3 child process exceptions, exceeding retry limit
STACK: Error: Jest worker encountered 3 child process exceptions, exceeding retry limit
    at ChildProcessWorker.initialize (/Users/guoyunhe/Git/test-jest-empty-file/node_modules/jest-worker/build/workers/ChildProcessWorker.js:181:21)
    at ChildProcessWorker._onExit (/Users/guoyunhe/Git/test-jest-empty-file/node_modules/jest-worker/build/workers/ChildProcessWorker.js:330:12)
    at ChildProcess.emit (node:events:513:28)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)

Additional context

src/other.ts caused the issue. it has no exports.

Environment

System:
    OS: macOS 13.0.1
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
  Binaries:
    Node: 16.17.1 - /usr/local/bin/node
    Yarn: 1.22.17 - /usr/local/bin/yarn
    npm: 8.15.0 - /usr/local/bin/npm
  npmPackages:
    jest: ^29.3.1 => 29.3.1
@guoyunhe guoyunhe changed the title [Bug]: empty file cause coverage collection error [Bug]: file without exports cause coverage collection error Nov 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Confirmed Bug is confirmed
Projects
None yet
Development

No branches or pull requests

2 participants