n8n/packages/@n8n/json-schema-to-zod/test/parsers/parse-const.test.ts

14 lines
259 B
TypeScript

import { z } from 'zod';
import { parseConst } from '../../src/parsers/parse-const';
describe('parseConst', () => {
test('should handle falsy constants', () => {
expect(
parseConst({
const: false,
}),
).toMatchZod(z.literal(false));
});
});