Skip to content

Commit

Permalink
Extend mock for IntersectionObserver with disconnect method. (#19366
Browse files Browse the repository at this point in the history
)
  • Loading branch information
linuspahl committed May 16, 2024
1 parent 825b4dc commit aeb5b02
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@
* along with this program. If not, see
* <http://www.mongodb.com/licensing/server-side-public-license>.
*/
const observe = jest.fn();
const unobserve = jest.fn();

window.IntersectionObserver = jest.fn(() => ({
observe,
unobserve,
observe: jest.fn(),
unobserve: jest.fn(),
disconnect: jest.fn(),
}));

0 comments on commit aeb5b02

Please sign in to comment.