({ options }: { options?: IntersectionOptions })
| 7 | }); |
| 8 | |
| 9 | const HookComponent = ({ options }: { options?: IntersectionOptions }) => { |
| 10 | const [ref, inView] = useInView(options); |
| 11 | |
| 12 | return ( |
| 13 | <div |
| 14 | ref={ref} |
| 15 | data-testid="wrapper" |
| 16 | style={{ height: 200, background: "cyan" }} |
| 17 | data-inview={inView} |
| 18 | > |
| 19 | InView block |
| 20 | </div> |
| 21 | ); |
| 22 | }; |
| 23 | |
| 24 | test("should come into view on after rendering", async () => { |
| 25 | render(<HookComponent />); |
nothing calls this directly
no test coverage detected
searching dependent graphs…