Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork6.6k
fix: prevent double teardown on test environment error#15731
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
netlifybot commentedJul 9, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
✅ Deploy Preview forjestjs ready!Builtwithout sensitive environment variables
To edit notification comments on pull requests, go to yourNetlify project configuration. |
pkg-pr-newbot commentedJul 9, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
babel-jestbabel-plugin-jest-hoistbabel-preset-jestcreate-jest@jest/diff-sequencesexpect@jest/expect-utilsjestjest-changed-filesjest-circusjest-clijest-config@jest/console@jest/core@jest/create-cache-key-functionjest-diffjest-docblockjest-each@jest/environmentjest-environment-jsdom@jest/environment-jsdom-abstractjest-environment-node@jest/expect@jest/fake-timers@jest/get-type@jest/globalsjest-haste-mapjest-jasmine2jest-leak-detectorjest-matcher-utilsjest-message-utiljest-mock@jest/patternjest-phabricatorjest-regex-util@jest/reportersjest-resolvejest-resolve-dependenciesjest-runnerjest-runtime@jest/schemasjest-snapshot@jest/snapshot-utils@jest/source-map@jest/test-result@jest/test-sequencer@jest/transform@jest/typesjest-utiljest-validatejest-watcherjest-workerpretty-formatcommit: |
ba5b2b1 toec50f9cCompareec50f9c tocac64d4ComparePlease note that the test coverage reduction report is erroneous. This case has been covered by E2E test I added. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thank you!
37b1686 intojestjs:mainUh oh!
There was an error while loading.Please reload this page.
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
This PR fixes a regression where errors thrown from a custom environment’s
teardown()method were masked by an internal error, rather than being reported to the user. This led to confusing error messages and made debugging custom environments difficult.isTornDownis always set in afinallyblock, even ifenvironment.teardown()throws. This prevents double teardown and ensures the real error is surfaced.teardown()Why
The "object" argument must be of type object. Received null) instead of the real cause.Test plan
teardown(), and asserts that the error is reported as expected.