diff --git a/test/pages/counter.test.tsx b/test/pages/counter.test.tsx index bd7363c..347dd1c 100644 --- a/test/pages/counter.test.tsx +++ b/test/pages/counter.test.tsx @@ -7,10 +7,10 @@ describe('Counter', () => { expect(screen.getByText('0', { selector: 'p' })) }) - it('Pressing `+` button increments the counter.', () => { + it('Pressing `+` button increments the counter.', async () => { render() expect(screen.getByText('0', { selector: 'p' })) - act(() => { + await act(async () => { fireEvent.click(screen.getByText('+', { selector: 'button' })) }) expect(screen.getByText('1', { selector: 'p' }))