Skip to content

Commit

Permalink
test(useToggle): modify to call the separated callToggle (#2253)
Browse files Browse the repository at this point in the history
  • Loading branch information
hwanyoungChoi committed Jul 13, 2023
1 parent c14a27f commit 5b056d0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/hooks/src/useToggle/__tests__/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ describe('useToggle', () => {
it('test on methods', async () => {
const hook = renderHook(() => useToggle('Hello'));
expect(hook.result.current[0]).toBe('Hello');
act(() => {
hook.result.current[1].toggle();
});
callToggle(hook);
expect(hook.result.current[0]).toBeFalsy();
act(() => {
hook.result.current[1].setLeft();
Expand Down

0 comments on commit 5b056d0

Please sign in to comment.