(props)
| 22 | // @gate __DEV__ |
| 23 | it('can use .act() to flush effects', () => { |
| 24 | function App(props) { |
| 25 | const [ctr, setCtr] = React.useState(0); |
| 26 | React.useEffect(() => { |
| 27 | props.callback(); |
| 28 | setCtr(1); |
| 29 | }, []); |
| 30 | return ctr; |
| 31 | } |
| 32 | const calledLog = []; |
| 33 | let root; |
| 34 | act(() => { |
nothing calls this directly
no test coverage detected