You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When globalSetup function returns an undefined rejected promise, Jest exits with zero exit code and unhandled rejection warning:
(node:23880) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'stack' of undefined
at Object.run (/path/to/project/node_modules/jest/node_modules/jest-cli/build/cli/index.js:169:15)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
To Reproduce
Create a global setup with the following content
module.exports => Promise.reject()
Expected behavior
Jest handles the rejection and exits with non-zero code.
This also worked as expected in Jest 25, so it seems to be a regression
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.
🐛 Bug Report
When
globalSetup
function returns an undefined rejected promise, Jest exits with zero exit code and unhandled rejection warning:To Reproduce
Create a global setup with the following content
Expected behavior
Jest handles the rejection and exits with non-zero code.
This also worked as expected in Jest 25, so it seems to be a regression
envinfo
The text was updated successfully, but these errors were encountered: