|
1 | | -import { cleanup } from '@testing-library/react'; |
2 | | -import { setUpHook, initialStateValues } from './utils/testUtils'; |
| 1 | +import { cleanup } from "@testing-library/react"; |
| 2 | +import { setUpHook, initialStateValues } from "./utils/testUtils"; |
3 | 3 |
|
4 | | -describe('useKeyCapture', () => { |
| 4 | +// add more test |
| 5 | + |
| 6 | +describe("useKeyCapture", () => { |
5 | 7 | afterEach(() => cleanup()); |
6 | 8 |
|
7 | | - describe('props', () => { |
8 | | - it('are present', () => { |
| 9 | + describe("props", () => { |
| 10 | + it("are present", () => { |
9 | 11 | const { result } = setUpHook(); |
10 | 12 | expect(result.current.keyData).toBeTruthy(); |
11 | 13 | expect(result.current.resetKeyData).toBeTruthy(); |
12 | 14 | expect(result.current.getTargetProps).toBeTruthy(); |
13 | 15 | }); |
14 | 16 | }); |
15 | 17 |
|
16 | | - describe('prop getters', () => { |
17 | | - it('are returned as functions', () => { |
| 18 | + describe("prop getters", () => { |
| 19 | + it("are returned as functions", () => { |
18 | 20 | const { result } = setUpHook(); |
19 | 21 | expect(result.current.getTargetProps).toBeInstanceOf(Function); |
20 | 22 | expect(result.current.resetKeyData).toBeInstanceOf(Function); |
21 | 23 | }); |
22 | 24 | }); |
23 | 25 |
|
24 | | - it('should have have correct initial state', () => { |
| 26 | + it("should have have correct initial state", () => { |
25 | 27 | const { result } = setUpHook(); |
26 | 28 |
|
27 | 29 | expect(result.current.keyData).toEqual(initialStateValues); |
|
0 commit comments