(initialArray?: T[])
| 8 | }); |
| 9 | |
| 10 | function getHook<T>(initialArray?: T[]) { |
| 11 | return renderHook( |
| 12 | (props): [number, [T[], ListActions<T>]] => { |
| 13 | const counter = useRef(0); |
| 14 | |
| 15 | return [++counter.current, useList(props)]; |
| 16 | }, |
| 17 | { initialProps: initialArray } |
| 18 | ); |
| 19 | } |
| 20 | |
| 21 | it('should init with 1st parameter and actions', () => { |
| 22 | const hook = getHook([1, 2, 3]); |
no test coverage detected
searching dependent graphs…