Skip to content

Commit

Permalink
update test to use expectTypeOf
Browse files Browse the repository at this point in the history
  • Loading branch information
iway1 committed Jan 14, 2023
1 parent b49a9b8 commit a1f0237
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/__tests__/createSchemaForm.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
useReqDescription,
useTsController,
} from "../FieldContext";
import { expectTypeOf } from "expect-type";
import { createUniqueFieldSchema } from "../createFieldSchema";

const testIds = {
Expand Down Expand Up @@ -793,7 +794,7 @@ describe("createSchemaForm", () => {
.refine((_) => true)
.transform((a) => a.a)}
onSubmit={(data) => {
data.startsWith("cool"); // just type checks as a string
expectTypeOf(data).toBeString();
}}
props={{
a: {
Expand Down

0 comments on commit a1f0237

Please sign in to comment.