From a1f02371843dea25ab2ce4543c31f6b172a86352 Mon Sep 17 00:00:00 2001 From: Isaac Way Date: Sat, 14 Jan 2023 12:06:58 -0600 Subject: [PATCH] update test to use expectTypeOf --- src/__tests__/createSchemaForm.test.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/__tests__/createSchemaForm.test.tsx b/src/__tests__/createSchemaForm.test.tsx index 0366673..4ba342c 100644 --- a/src/__tests__/createSchemaForm.test.tsx +++ b/src/__tests__/createSchemaForm.test.tsx @@ -22,6 +22,7 @@ import { useReqDescription, useTsController, } from "../FieldContext"; +import { expectTypeOf } from "expect-type"; import { createUniqueFieldSchema } from "../createFieldSchema"; const testIds = { @@ -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: {