Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
unused
Browse files Browse the repository at this point in the history
  • Loading branch information
KATT committed Oct 3, 2023
1 parent 65a542a commit 618d50c
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions src/internals/testUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,3 @@ export const expectError = (fn: () => unknown) => {
expect(err).toBeInstanceOf(Error);
return err as Error;
};

export const waitError = async (
fnOrPromise: (() => unknown) | Promise<unknown>,
) => {
let err: unknown;
try {
await (typeof fnOrPromise === "function" ? fnOrPromise() : fnOrPromise);
} catch (_err) {
err = _err;
}

expect(err).toBeDefined();
expect(err).toBeInstanceOf(Error);
return err as Error;
};

0 comments on commit 618d50c

Please sign in to comment.