fix: fixed npx eslint (also accounting for justins part)

ref: N25B-142
This commit is contained in:
Björn Otgaar
2025-11-05 17:21:36 +01:00
parent 571908cd70
commit 1b8095376b
2 changed files with 4 additions and 3 deletions

View File

@@ -25,7 +25,9 @@ class MockEventSource {
// mock event source generation with fake function that returns our fake mock source
beforeAll(() => {
(globalThis as any).EventSource = jest.fn((url: string) => new MockEventSource(url));
// Cast globalThis to a type exposing EventSource and assign a mocked constructor.
(globalThis as unknown as { EventSource?: typeof EventSource }).EventSource =
jest.fn((url: string) => new MockEventSource(url)) as unknown as typeof EventSource;
});
// clean after tests