chore(FN-1485): align dashboard api lint hygiene

This commit is contained in:
gsxdsm
2026-04-13 13:11:39 -07:00
parent 492f7acd6e
commit 4e61a05031
2 changed files with 16 additions and 9 deletions

View File

@@ -2796,13 +2796,21 @@ describe("resilient SSE reconnect", () => {
beforeEach(() => {
vi.useFakeTimers();
ControlledEventSource.instances = [];
(globalThis as any).EventSource = ControlledEventSource;
Object.defineProperty(globalThis, "EventSource", {
configurable: true,
writable: true,
value: ControlledEventSource,
});
globalThis.fetch = vi.fn().mockReturnValue(mockFetchResponse(true, { ok: true }));
});
afterEach(() => {
vi.useRealTimers();
(globalThis as any).EventSource = OriginalEventSource;
Object.defineProperty(globalThis, "EventSource", {
configurable: true,
writable: true,
value: OriginalEventSource,
});
globalThis.fetch = originalFetch;
});