Skip to content

Commit

Permalink
Merge pull request #1206 from capricorn86/task/1205-jest-environment-…
Browse files Browse the repository at this point in the history
…doesnt-wait-for-all-operations-to-be-aborted-before-closing

#1205@patch: Fixes issue related to "@happy-dom/jest-environment" not…
  • Loading branch information
capricorn86 committed Jan 13, 2024
2 parents d4dd276 + 258f4b9 commit 5e061cf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/jest-environment/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ export default class HappyDOMEnvironment implements JestEnvironment {
this.fakeTimers.dispose();
this.fakeTimersModern.dispose();

await (<IWindow>(<unknown>this.global)).happyDOM.abort();
(<IWindow>(<unknown>this.global)).close();

this.global = null;
Expand Down

0 comments on commit 5e061cf

Please sign in to comment.