(fn: () => Promise<void>, expected: Error)
| 345 | }); |
| 346 | |
| 347 | async function expectAsyncError(fn: () => Promise<void>, expected: Error) { |
| 348 | let error: unknown | null = null; |
| 349 | try { |
| 350 | await fn(); |
| 351 | } catch (e: unknown) { |
| 352 | error = e; |
| 353 | } |
| 354 | expect(error).not.toBe(null); |
| 355 | expect(error instanceof Error).toBe(true); |
| 356 | expect((error as Error).message).toBe(expected.message); |
| 357 | } |
| 358 | |
| 359 | it('should be able to clear', async () => { |
| 360 | const input = await harness.input(); |
no outgoing calls
no test coverage detected