Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
test('toggleOpen toggles isOpen', () => {
const {result} = renderHook(useCollapse);
const {toggleOpen} = result.current;
act(toggleOpen);
const {isOpen} = result.current;
expect(isOpen).toBe(true);
});
test('toggleOpen toggles isOpen', () => {
const {result} = renderHook(useCollapse);
const {toggleOpen} = result.current;
act(toggleOpen);
const {isOpen} = result.current;
expect(isOpen).toBe(true);
});