Skip to content
Source
Sign inSign up
TanStack/router
Open History to see the last commit

vitest.setup.ts

16 lines316 Bytes

1import { beforeEach } from 'vitest'
2import { endMemoryTurn, isMemoryInstrumented } from '../turn'
3​
4// @ts-expect-error
5global.IS_REACT_ACT_ENVIRONMENT = true
6​
7const scrollTo = () => {}
8​
9window.scrollTo = scrollTo
10globalThis.scrollTo = scrollTo
11​
12export {}
13​
14if (isMemoryInstrumented()) {
15 beforeEach(endMemoryTurn)