diff --git a/clients/web/src/App.test.tsx b/clients/web/src/App.test.tsx index 09d1e67e..fdf01413 100644 --- a/clients/web/src/App.test.tsx +++ b/clients/web/src/App.test.tsx @@ -2552,7 +2552,9 @@ describe("App background command rejections (#2049)", () => { const rejections = captureUnhandledRejections(); try { const user = await connect(); - const client = clientInstances[0] as unknown as { + // Single assertion: the fake client IS an EventTarget, so narrowing it + // to that intersection needs no `as unknown as` detour. + const client = clientInstances[0] as EventTarget & { setLoggingLevel: ReturnType; }; client.setLoggingLevel.mockRejectedValueOnce(new Error("no logging"));