Skip to content

Commit 7adbfdf

Browse files
committed
fix: update scrollIntoView mock to use global object
1 parent 40a5095 commit 7adbfdf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/config/jest.setup-tests.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ beforeAll(async () => {
6767
global[obj].addEventListener = addEventListenerSpy;
6868
});
6969

70-
if (!window.HTMLElement.prototype.scrollIntoView) {
71-
Object.defineProperty(window.HTMLElement.prototype, 'scrollIntoView', {
70+
if (!global.HTMLElement.prototype.scrollIntoView) {
71+
Object.defineProperty(global.HTMLElement.prototype, 'scrollIntoView', {
7272
configurable: true,
7373
writable: true,
7474
value: () => {},

0 commit comments

Comments
 (0)