Skip to content

Commit c3ed7d9

Browse files
pierrezimmermannbammdjastrzebski
authored andcommitted
refactor: add comment making test on act environment more explicit
1 parent c371dd3 commit c3ed7d9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/user-event/__tests__/act.test.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ import { userEvent } from '..';
55
import { screen } from '../../screen';
66

77
test('user event disables act environmennt', async () => {
8+
// In this There is state update during a wait when typing
9+
// Since wait is not wrapped by act there would be a warning
10+
// if act environment was not disabled
811
const consoleErrorSpy = jest.spyOn(console, 'error');
912
jest.useFakeTimers();
1013
const TestComponent = () => {

0 commit comments

Comments
 (0)