[MIRROR] fix multiple tests leaking dom into each other (#12925)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2026-07-23 22:56:05 +02:00
committed by GitHub
co-authored by Kashargul
parent 76e7a62fe8
commit 45bdf43150
2 changed files with 7 additions and 2 deletions
+6 -1
View File
@@ -1,5 +1,10 @@
import { afterEach } from 'bun:test';
import { GlobalRegistrator } from '@happy-dom/global-registrator';
GlobalRegistrator.register();
import './packages/tgui/__mocks__/setup.ts';
const { cleanup } = await import('@testing-library/react');
afterEach(cleanup);
import './packages/tgui/__mocks__/setup';
+1 -1
View File
@@ -28,5 +28,5 @@
"strictNullChecks": true,
"target": "ESNext"
},
"include": ["./*.d.ts", "./packages"]
"include": ["./*.d.ts", "./packages", "happydom.ts"]
}