Skip to content

Commit d41d947

Browse files
committed
add comments
1 parent 8f4fd6f commit d41d947

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
@@ -492,6 +492,8 @@ test('navigates to settings with previous preload', () => {
492492

493493
expect(renderCounter).toBe(0);
494494

495+
// navigate.preload causes React state updates
496+
// So it should be wrapped into act
495497
act(() => navigation.preload('Settings'));
496498

497499
expect(screen.queryByText('Profile Screen')).toBeOnTheScreen();
@@ -563,6 +565,8 @@ test('navigates to settings with previous preload', () => {
563565

564566
expect(renderCounter).toBe(0);
565567

568+
// navigation.preload causes React state updates
569+
// So it should be wrapped into act
566570
act(() => navigation.preload('Settings'));
567571

568572
expect(screen.queryByText('Profile Screen')).toBeOnTheScreen();

0 commit comments

Comments
 (0)