UNPKG

zod-error

Version:

Utilities to format and customize Zod error messages

7 lines (6 loc) 536 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const _1 = require("."); const path = ['car', 'wheels', 0]; test('a zod path is converted to object notation with default settings', () => expect((0, _1.getObjectNotation)(path, { enabled: true, type: 'objectNotation' })).toBe('car.wheels[0]')); test('a zod path is converted to object notation with default settings', () => expect((0, _1.getObjectNotation)(path, { enabled: true, type: 'objectNotation', arraySquareBrackets: false })).toBe('car.wheels.0'));