From 2296f2f5453207617584d9f93e9e50579ce60ec3 Mon Sep 17 00:00:00 2001 From: Vitaly Budovski Date: Tue, 24 Dec 2024 18:12:48 +1100 Subject: [PATCH] fix: Incorrectly named test file Fix incorrect test result within. --- paseri-lib/src/schemas/{safe-parse.ts => safe-parse.test.ts} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename paseri-lib/src/schemas/{safe-parse.ts => safe-parse.test.ts} (95%) diff --git a/paseri-lib/src/schemas/safe-parse.ts b/paseri-lib/src/schemas/safe-parse.test.ts similarity index 95% rename from paseri-lib/src/schemas/safe-parse.ts rename to paseri-lib/src/schemas/safe-parse.test.ts index bf3eaec..b115907 100644 --- a/paseri-lib/src/schemas/safe-parse.ts +++ b/paseri-lib/src/schemas/safe-parse.test.ts @@ -19,7 +19,7 @@ test('Failure', () => { const schema = p.string(); const result = schema.safeParse(123); if (!result.ok) { - expect(result.issue).toEqual({ type: 'leaf', code: 'invalid_type' }); + expect(result.issue).toEqual({ type: 'leaf', code: 'invalid_type', expected: 'string' }); } else { expect(result.ok).toBeFalsy(); }