diff --git a/src/__tests__/static-render.tsx b/src/__tests__/static-render.tsx index a2f0fb1..4740a14 100644 --- a/src/__tests__/static-render.tsx +++ b/src/__tests__/static-render.tsx @@ -63,7 +63,7 @@ describe('', () => { onClick={() => void batchReplaceState(['default'], (state) => { if (state) { - state.someParameter = 'nextBatchPushState' + state.someParameter = 'nextBatchReplaceState' } }) } @@ -106,9 +106,9 @@ describe('', () => { expect(screen.getByRole('content').textContent).toEqual('nextReplaceState') }) - it('should support batchPushState', async () => { + it('should support batch handling', async () => { render( - + ) @@ -118,5 +118,11 @@ describe('', () => { expect(screen.getByRole('content').textContent).toEqual( 'nextBatchPushState' ) + await act(async () => { + await userEvent.click(screen.getByRole('batchReplace')) + }) + expect(screen.getByRole('content').textContent).toEqual( + 'nextBatchReplaceState' + ) }) })