aboutsummaryrefslogtreecommitdiffstats
path: root/frontend-vanilla/src/main.test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'frontend-vanilla/src/main.test.ts')
-rw-r--r--frontend-vanilla/src/main.test.ts14
1 files changed, 7 insertions, 7 deletions
diff --git a/frontend-vanilla/src/main.test.ts b/frontend-vanilla/src/main.test.ts
index be5a076..aa0568b 100644
--- a/frontend-vanilla/src/main.test.ts
+++ b/frontend-vanilla/src/main.test.ts
@@ -21,13 +21,13 @@ vi.mock('./api', () => ({
apiFetch: vi.fn()
}));
-// Mock IntersectionObserver
-const mockObserver = vi.fn(() => ({
- observe: vi.fn(),
- unobserve: vi.fn(),
- disconnect: vi.fn(),
-}));
-vi.stubGlobal('IntersectionObserver', mockObserver);
+// Mock IntersectionObserver as a constructor
+class MockIntersectionObserver {
+ observe = vi.fn();
+ unobserve = vi.fn();
+ disconnect = vi.fn();
+}
+vi.stubGlobal('IntersectionObserver', MockIntersectionObserver);
describe('main application logic', () => {
beforeEach(() => {