fix: drop unused assertNotWindows param from closeAllWindows

vitest passes a context object as the first arg to hook callbacks, so
afterEach(closeAllWindows) effectively called closeAllWindows(ctx) - a
truthy value that triggered the unused assert-no-windows-remain path,
producing unhandled rejections. afterAll(closeAllWindows) failed outright
with a FixtureParseError because vitest parses the param list.

No caller ever passed the argument explicitly, so the param is removed.
This commit is contained in:
Samuel Attard
2026-04-12 01:01:07 -07:00
parent 984f5c5023
commit 7cdd1314d2

View File

@@ -48,10 +48,10 @@ export const closeWindow = async (
}
};
export async function closeAllWindows(assertNotWindows = false) {
export async function closeAllWindows() {
let windowsClosed = 0;
for (const w of BaseWindow.getAllWindows()) {
await closeWindow(w, { assertNotWindows });
await closeWindow(w, { assertNotWindows: false });
windowsClosed++;
}
return windowsClosed;