Skip to content

Commit

Permalink
#1205@patch: Fixes issue related to "@happy-dom/jest-environment" not…
Browse files Browse the repository at this point in the history
… waiting for all operations to abort before closing.
  • Loading branch information
capricorn86 committed Jan 13, 2024
1 parent d4dd276 commit 258f4b9
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 258f4b9

Please sign in to comment.