From 0df63f6934cc88e6e0743499b9bc3b560c290bfd Mon Sep 17 00:00:00 2001 From: quanmuito Date: Sun, 28 Jan 2024 02:19:30 +0200 Subject: [PATCH] fix test 25 --- src/__tests__/App.test.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/__tests__/App.test.tsx b/src/__tests__/App.test.tsx index 5abdaad..ccf55a0 100644 --- a/src/__tests__/App.test.tsx +++ b/src/__tests__/App.test.tsx @@ -38,10 +38,8 @@ test.each(deliveryCases)( const orderTimeInput = await screen.findByLabelText(/order time/i); fireEvent.change(orderTimeInput, { target: { value: dt } }); - act(() => { - fireEvent.click(screen.getByText(/calculate delivery price/i)); - return new Promise((resolve) => setTimeout(resolve, 1000)); - }); + act(() => fireEvent.click(screen.getByText(/calculate delivery price/i))); + new Promise((resolve) => setTimeout(resolve, 1000)); const result = await screen.findByTestId('fee'); expect(result).toHaveTextContent(expected); }