Skip to content

Commit 08a1e5c

Browse files
committed
useFakeTimers
1 parent 29eff89 commit 08a1e5c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/cookbook/app/network-requests/__tests__/PhoneBook.test.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import { User } from '../types';
66

77
jest.mock('axios');
88

9-
jest.setTimeout(8000);
9+
// jest.setTimeout(10000);
10+
jest.useFakeTimers();
1011
describe('PhoneBook', () => {
1112
it('fetches contacts successfully and renders in list', async () => {
1213
(global.fetch as jest.Mock).mockResolvedValueOnce({

0 commit comments

Comments
 (0)