mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-26 21:19:43 -08:00
19 lines
385 B
TypeScript
19 lines
385 B
TypeScript
import { z } from 'zod';
|
|
|
|
import { parseSchema } from '../../src/parsers/parse-schema';
|
|
|
|
describe('parseNullable', () => {
|
|
test('parseSchema should not add default twice', () => {
|
|
expect(
|
|
parseSchema(
|
|
{
|
|
type: 'string',
|
|
nullable: true,
|
|
default: null,
|
|
},
|
|
{ path: [], seen: new Map() },
|
|
),
|
|
).toMatchZod(z.string().nullable().default(null));
|
|
});
|
|
});
|