diff --git a/packages/viewport/src/test/if-viewport-matches.js b/packages/viewport/src/test/if-viewport-matches.js index fcf1d168067dd9..a8b7c4717f7296 100644 --- a/packages/viewport/src/test/if-viewport-matches.js +++ b/packages/viewport/src/test/if-viewport-matches.js @@ -40,6 +40,6 @@ describe( 'ifViewportMatches()', () => { expect( useViewportMatch ).toHaveBeenCalledWith( 'wide', '>=' ); - expect( screen.queryByText( 'Hello' ) ).toBeInTheDocument(); + expect( screen.getByText( 'Hello' ) ).toBeInTheDocument(); } ); } );