Skip to content

Commit 6797ba7

Browse files
committed
add fakeTimers to example 4 to fix warnings
1 parent 4802247 commit 6797ba7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

versioned_docs/version-7.x/testing.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -848,6 +848,8 @@ async function mockedFetch() {
848848
}
849849

850850
test('on every profile screen focus, displays loading state while waiting for data and then shows fetched profile', async () => {
851+
jest.useFakeTimers();
852+
851853
const TabNavigation = createStaticNavigation(TabNavigator);
852854
render(<TabNavigation />);
853855

@@ -898,6 +900,8 @@ async function mockedFetch() {
898900
}
899901

900902
test('on every profile screen focus, displays loading state while waiting for data and then shows fetched profile', async () => {
903+
jest.useFakeTimers();
904+
901905
render(
902906
<NavigationContainer>
903907
<TabNavigator />

0 commit comments

Comments
 (0)