-
Notifications
You must be signed in to change notification settings - Fork 190
Closed as not planned
Description
Describe the bug A clear and concise description of what the bug is.
When trying to upgrade Vitest from 1.6 to 2.0 I'm getting these warnings:
React Intersection Observer was not configured to handle mocking.
Outside Jest and Vitest, you might need to manually configure it by calling setupIntersectionMocking() and resetIntersectionMocking() in your test setup file.
// test-setup.js
import { resetIntersectionMocking, setupIntersectionMocking } from 'react-intersection-observer/test-utils';
beforeEach(() => {
setupIntersectionMocking(vi.fn);
});
afterEach(() => {
resetIntersectionMocking();
});
To Reproduce Try and recreate the issue in a Codesandbox:
none yet
Expected behavior A clear and concise description of what you expected to
happen.
Should detect Vitest 2 similar to Vitest 1.6
Additional context Add any other context about the problem here.
Running latest version, 9.10.3
Metadata
Metadata
Assignees
Labels
No labels