Skip to content

Commit

Permalink
Clear the useViewportMatch mock after each test
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonjd committed Sep 4, 2023
1 parent 25d328a commit 865aecb
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ jest.mock( '@wordpress/compose/src/hooks/use-viewport-match', () => jest.fn() );

describe( 'EditPostPreferencesModal', () => {
describe( 'should match snapshot when the modal is active', () => {
afterEach( () => {
useViewportMatch.mockClear();
} );
it( 'large viewports', async () => {
useSelect.mockImplementation( () => [ true, true, false ] );
useViewportMatch.mockImplementation( () => true );
Expand Down

0 comments on commit 865aecb

Please sign in to comment.