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', () => {
140140 expectClickLogsLengthToBe ( testRefsComponent , 1 ) ;
141141
142142 // 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 ( ) ) ;
144144 expectClickLogsLengthToBe ( testRefsComponent , 1 ) ;
145145
146146 // Begin incrementing clicks (and therefore refs).
147- clickIncrementer . click ( ) ;
147+ ReactTestUtils . act ( ( ) => clickIncrementer . click ( ) ) ;
148148 expectClickLogsLengthToBe ( testRefsComponent , 2 ) ;
149149
150- clickIncrementer . click ( ) ;
150+ ReactTestUtils . act ( ( ) => clickIncrementer . click ( ) ) ;
151151 expectClickLogsLengthToBe ( testRefsComponent , 3 ) ;
152152
153153 // Now reset again
154- testRefsComponent . refs . resetDiv . click ( ) ;
154+ ReactTestUtils . act ( ( ) => testRefsComponent . refs . resetDiv . click ( ) ) ;
155155 expectClickLogsLengthToBe ( testRefsComponent , 1 ) ;
156156 } ) ;
157157} ) ;
You can’t perform that action at this time.
0 commit comments