From 75d75126d4f23210fedee1a3afb0375f2f6a486d Mon Sep 17 00:00:00 2001 From: Vitaly Rtishchev Date: Fri, 15 Mar 2024 15:40:39 +0400 Subject: [PATCH] Add Jest scrollIntoView mock --- jest.setup.cjs | 1 + 1 file changed, 1 insertion(+) diff --git a/jest.setup.cjs b/jest.setup.cjs index 2f5c44d..239840b 100644 --- a/jest.setup.cjs +++ b/jest.setup.cjs @@ -2,6 +2,7 @@ require('@testing-library/jest-dom'); const { getComputedStyle } = window; window.getComputedStyle = (elt) => getComputedStyle(elt); +window.HTMLElement.prototype.scrollIntoView = () => {}; Object.defineProperty(window, 'matchMedia', { writable: true,