(action: (testFn: jest.Mock<any, any>) => void)
| 20 | * @param action |
| 21 | */ |
| 22 | export function expectFnCalled(action: (testFn: jest.Mock<any, any>) => void) { |
| 23 | const testFn = jest.fn(); |
| 24 | |
| 25 | action(testFn); |
| 26 | expect(testFn).toBeCalled(); |
| 27 | } |
| 28 | |
| 29 | export function querySelector(className) { |
| 30 | return document.body.querySelector(className); |
no outgoing calls
no test coverage detected