Skip to content

Commit 3c6633a

Browse files
chore: silence error in test (#4794)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
1 parent 77fa17b commit 3c6633a

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
import '@testing-library/jest-dom/vitest'
2+
import { vi } from 'vitest'
23

34
// @ts-expect-error
45
global.IS_REACT_ACT_ENVIRONMENT = true
6+
7+
// Mock window.scrollTo to silence errors in tests
8+
window.scrollTo = vi.fn()
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
import '@testing-library/jest-dom/vitest'
2+
import { vi } from 'vitest'
23

34
// @ts-expect-error
45
global.IS_REACT_ACT_ENVIRONMENT = true
6+
7+
// Mock window.scrollTo to silence errors in tests
8+
window.scrollTo = vi.fn()

0 commit comments

Comments
 (0)