* Get the test utility object, depending on the environment. This could be either `vi` (Vitest) or `jest`. * Type is mapped to Vitest, so we don't mix in Jest types when running in Vitest.
()
| 19 | * Type is mapped to Vitest, so we don't mix in Jest types when running in Vitest. |
| 20 | */ |
| 21 | function testLibraryUtil(): typeof vi | undefined { |
| 22 | if (typeof vi !== "undefined") return vi; |
| 23 | // @ts-expect-error We don't include the Jest types |
| 24 | if (typeof jest !== "undefined") return jest; |
| 25 | return undefined; |
| 26 | } |
| 27 | |
| 28 | /** |
| 29 | * Check if the IntersectionObserver is currently being mocked. |
no outgoing calls
no test coverage detected
searching dependent graphs…