Jest Worker swallows exception with UnhandledPromiseRejectionWarning
See original GitHub issue🐛 Bug Report
When running a task inside a Jest Worker, exceptions get swallowed and raised as UnhandledPromiseRejectionWarning
, making it hard to debug.
To Reproduce
Clone this repo, and run the following:
yarn
yarn run production
Expected behavior
I should see an exception from css-minimizer-webpack-plugin
complaining about this line (wrong variable interpolation).
Instead, all I see is:
UnhandledPromiseRejectionWarning: DataCloneError: function destructLexErrorInfo() {
// remove cyclic references added to error info:
// info....<omitted>... } could not be cloned.
at reportError (/Users/mattiagiuffrida/Development/sensortower/overseer/node_modules/jest-worker/build/workers/threadChild.js:100:32)
at reportClientError (/Users/mattiagiuffrida/Development/sensortower/overseer/node_modules/jest-worker/build/workers/threadChild.js:84:10)
An issue has already been raised in https://github.com/webpack-contrib/css-minimizer-webpack-plugin/issues/113, but the team there advised this is an issue with jest-worker
.
Link to repl or repo (highly encouraged)
https://github.com/mattiagiuffrida-st/css-minimizer-webpack-plugin-error See “To Reproduce” on how to run the failing script
envinfo
System:
OS: macOS 11.5.1
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Binaries:
Node: 14.15.4 - ~/.nvm/versions/node/v14.15.4/bin/node
Yarn: 1.22.10 - ~/.nvm/versions/node/v14.15.4/bin/yarn
npm: 6.14.10 - ~/.nvm/versions/node/v14.15.4/bin/npm
Issue Analytics
- State:
- Created 2 years ago
- Reactions:22
- Comments:9
Top Results From Across the Web
How do I fail a test in Jest when an uncaught promise ...
The code I'm testing is throwing errors within promises resulting in an UnhandledPromiseRejectionWarning message being logged to the console.
Read more >cannot send the message - the message port has been ...
"Checked exceptions are bad because programmers just abuse them by always catching them and dismissing them which leads to problems being hidden and...
Read more >Changelog | skuba - GitHub Pages
The worker threads now correctly propagate an exit code and log errors instead of triggering an UnhandledPromiseRejectionWarning . format, lint: Limit Prettier ...
Read more >storybookjs/storybook (Raised $170.00)
[Bug]: Does not work in a a project using yarn but not a git/subversion, or a git worktree ... `@storybook/addon-jest` does not show...
Read more >Android action bar transparent programmatically
(node:621)= unhandledpromiserejectionwarning:= error:= failed= to= chrome!= ... false]); don't work authenticatecorea sync owin not hadling exception ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Please fix issue, i have same problem 😦 !!!
Not sure why the
Needs Repro
label was added since I’ve provided reproduction steps 🤨