From 7cdd1314d2b6f9b1a5e00c23c8d187217df20fa2 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Sun, 12 Apr 2026 01:01:07 -0700 Subject: [PATCH] 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. --- spec/lib/window-helpers.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/lib/window-helpers.ts b/spec/lib/window-helpers.ts index e70de77f8d..7cb874dc4d 100644 --- a/spec/lib/window-helpers.ts +++ b/spec/lib/window-helpers.ts @@ -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;