The main-model apply test raises a success toast, which arms a 5 s auto-dismiss timer. Nothing cleared it, so when it fired after the file's jsdom window was gone, vitest reported "window is not defined" from dismissNotification as an unhandled error and failed JS & TS checks with every test green. afterEach now calls clearNotifications().