Skip to content

Commit

Permalink
JavaScript Tests: Use useEffect instead of useLayoutEffect (#6830)
Browse files Browse the repository at this point in the history
  • Loading branch information
spacedmonkey committed Mar 19, 2021
1 parent 4aeb711 commit 59889b2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/js/setup-mocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,8 @@
import { enableFetchMocks } from 'jest-fetch-mock';

enableFetchMocks();

jest.mock('react', () => ({
...jest.requireActual('react'),
useLayoutEffect: jest.requireActual('react').useEffect,
}));

0 comments on commit 59889b2

Please sign in to comment.