File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
packages/react-dom/src/__tests__ Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -140,18 +140,18 @@ describe('reactiverefs', () => {
140
140
expectClickLogsLengthToBe ( testRefsComponent , 1 ) ;
141
141
142
142
// After clicking the reset, there should still only be one click log ref.
143
- testRefsComponent . refs . resetDiv . click ( ) ;
143
+ ReactTestUtils . act ( ( ) => testRefsComponent . refs . resetDiv . click ( ) ) ;
144
144
expectClickLogsLengthToBe ( testRefsComponent , 1 ) ;
145
145
146
146
// Begin incrementing clicks (and therefore refs).
147
- clickIncrementer . click ( ) ;
147
+ ReactTestUtils . act ( ( ) => clickIncrementer . click ( ) ) ;
148
148
expectClickLogsLengthToBe ( testRefsComponent , 2 ) ;
149
149
150
- clickIncrementer . click ( ) ;
150
+ ReactTestUtils . act ( ( ) => clickIncrementer . click ( ) ) ;
151
151
expectClickLogsLengthToBe ( testRefsComponent , 3 ) ;
152
152
153
153
// Now reset again
154
- testRefsComponent . refs . resetDiv . click ( ) ;
154
+ ReactTestUtils . act ( ( ) => testRefsComponent . refs . resetDiv . click ( ) ) ;
155
155
expectClickLogsLengthToBe ( testRefsComponent , 1 ) ;
156
156
} ) ;
157
157
} ) ;
You can’t perform that action at this time.
0 commit comments