Skip to content

Commit

Permalink
Satisfy TS, Deno
Browse files Browse the repository at this point in the history
  • Loading branch information
tmcw committed Dec 12, 2022
1 parent 533e054 commit 2e12b10
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion deno/lib/__tests__/catch.test.ts
Expand Up @@ -10,7 +10,7 @@ test("basic catch", () => {
});

test("catch fn does not run when parsing succeeds", () => {
const cb = jest.fn();
const cb = jest.fn().mockReturnValue("x") as () => string;
expect(z.string().catch(cb).parse("test")).toBe("test");
expect(cb).not.toBeCalled();
});
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/catch.test.ts
@@ -1,5 +1,5 @@
// @ts-ignore TS6133
import { expect, test } from "@jest/globals";
import { expect, jest, test } from "@jest/globals";

import { z } from "..";
import { util } from "../helpers/util";
Expand All @@ -9,7 +9,7 @@ test("basic catch", () => {
});

test("catch fn does not run when parsing succeeds", () => {
const cb = jest.fn();
const cb = jest.fn().mockReturnValue("x") as () => string;
expect(z.string().catch(cb).parse("test")).toBe("test");
expect(cb).not.toBeCalled();
});
Expand Down

0 comments on commit 2e12b10

Please sign in to comment.