From 798f002b19ce7ee63da12bb930aad78a79d67967 Mon Sep 17 00:00:00 2001 From: winewill Date: Mon, 19 Oct 2026 17:01:48 +0800 Subject: [PATCH] test(desktop): preserve native transition error identity --- apps/desktop/tests/update-window.spec.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/desktop/tests/update-window.spec.ts b/apps/desktop/tests/update-window.spec.ts index c755a76e92..bc1cf2dba7 100644 --- a/apps/desktop/tests/update-window.spec.ts +++ b/apps/desktop/tests/update-window.spec.ts @@ -61,8 +61,9 @@ it('rejects a stalled native transition and allows a later attempt to complete', it('releases native listeners when requesting the transition throws', async () => { vi.useFakeTimers() const f = setup() - f.window.setFullScreen.mockImplementation(() => { throw new Error('native window unavailable') }) - await expect(f.prepare()).rejects.toThrow('native window unavailable') + const nativeError = new Error('native window unavailable') + f.window.setFullScreen.mockImplementation(() => { throw nativeError }) + await expect(f.prepare()).rejects.toBe(nativeError) expect(f.window.eventNames()).toEqual([]) expect(vi.getTimerCount()).toBe(0) })