From babd21475b663fb66bc512a21a1b38d79c278f69 Mon Sep 17 00:00:00 2001 From: Tom Mrazauskas Date: Mon, 22 Jul 2024 18:52:18 +0300 Subject: [PATCH] fix: typings of `it()` and `test()` helpers (#582) --- src/modules/helpers/it.ts | 2 +- src/modules/helpers/test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/helpers/it.ts b/src/modules/helpers/it.ts index a14db8d7..5cbfbf08 100644 --- a/src/modules/helpers/it.ts +++ b/src/modules/helpers/it.ts @@ -9,7 +9,7 @@ export async function it( message: string, cb: () => Promise ): Promise; -export async function it(message: string, cb: () => unknown): Promise; +export function it(message: string, cb: () => unknown): void; export async function it(cb: () => Promise): Promise; export function it(cb: () => unknown): void; /* c8 ignore next */ // ? diff --git a/src/modules/helpers/test.ts b/src/modules/helpers/test.ts index a9396142..936a8a78 100644 --- a/src/modules/helpers/test.ts +++ b/src/modules/helpers/test.ts @@ -9,7 +9,7 @@ export async function test( message: string, cb: () => Promise ): Promise; -export async function test(message: string, cb: () => unknown): Promise; +export function test(message: string, cb: () => unknown): void; export async function test(cb: () => Promise): Promise; export function test(cb: () => unknown): void; /* c8 ignore next */ // ?