Skip to content

Commit 3c157e2

Browse files
committed
test: fix util test for sets with enum
1 parent 60433ce commit 3c157e2

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

apps/web/src/features/upload/utils.test.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,12 @@ describe('getZodTypeName', () => {
1717
it('should parse a z.boolean()', () => {
1818
expect(getZodTypeName(z.boolean())).toMatchObject({ isOptional: false, success: true, typeName: 'ZodBoolean' });
1919
});
20-
it('should parse a z.set(z.string())', () => {
21-
expect(getZodTypeName(z.set(z.string()))).toMatchObject({ isOptional: false, success: true, typeName: 'ZodSet' });
20+
it('should parse a z.set(z.enum([]))', () => {
21+
expect(getZodTypeName(z.set(z.enum(['a', 'b', 'c'])))).toMatchObject({
22+
isOptional: false,
23+
success: true,
24+
typeName: 'ZodSet'
25+
});
2226
});
2327
it('should parse a z.string().optional()', () => {
2428
expect(getZodTypeName(z.string().optional())).toMatchObject({

0 commit comments

Comments
 (0)