From c9ba561a4f46e7280f7bc1b9e4a89d50afa50d89 Mon Sep 17 00:00:00 2001 From: m-tartari <37861893+m-tartari@users.noreply.github.com> Date: Thu, 3 Jul 2025 11:54:08 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20test:=20stub=20window.scrollTo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/setupTests.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/setupTests.ts b/src/setupTests.ts index ab619fc..6269521 100644 --- a/src/setupTests.ts +++ b/src/setupTests.ts @@ -14,6 +14,11 @@ afterEach(() => { cleanup() }) +/** + * Mocks the window.scrollTo method (called on page change) + */ +vi.stubGlobal('scrollTo', vi.fn()) + /** * Mocks the ResizeObserver API (used by ParallaxProvider) */