()
| 92 | // @gate enableFragmentRefs |
| 93 | it('is available in effects', async () => { |
| 94 | function Test() { |
| 95 | const fragmentRef = React.useRef(null); |
| 96 | React.useLayoutEffect(() => { |
| 97 | expect(fragmentRef.current).not.toBe(null); |
| 98 | }); |
| 99 | React.useEffect(() => { |
| 100 | expect(fragmentRef.current).not.toBe(null); |
| 101 | }); |
| 102 | return ( |
| 103 | <Fragment ref={fragmentRef}> |
| 104 | <div /> |
| 105 | </Fragment> |
| 106 | ); |
| 107 | } |
| 108 | |
| 109 | const root = ReactDOMClient.createRoot(container); |
| 110 | await act(() => root.render(<Test />)); |
nothing calls this directly
no test coverage detected