From ef32f39f7c96097bb02d099f2b29f0154a73d175 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20G=C3=B3is?= Date: Fri, 18 Oct 2024 14:05:48 +0100 Subject: [PATCH] test: fix failing test --- frontend/src/setupTests.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/frontend/src/setupTests.ts b/frontend/src/setupTests.ts index 870c883bfd..338adb8256 100644 --- a/frontend/src/setupTests.ts +++ b/frontend/src/setupTests.ts @@ -9,10 +9,27 @@ class ResizeObserver { disconnect() {} } +class IntersectionObserver { + root: any; + rootMargin: any; + thresholds: any; + + observe() {} + unobserve() {} + disconnect() {} + takeRecords() { + return []; + } +} + if (!window.ResizeObserver) { window.ResizeObserver = ResizeObserver; } +if (!window.IntersectionObserver) { + window.IntersectionObserver = IntersectionObserver; +} + process.env.TZ = 'UTC'; const errorsToIgnore = [