zod 3.25.4 → 3.25.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/commonjs/v3/types.d.ts +1 -1
  2. package/dist/commonjs/v4/classic/errors.d.ts +1 -1
  3. package/dist/commonjs/v4/classic/errors.js +1 -0
  4. package/dist/commonjs/v4/classic/parse.d.ts +1 -1
  5. package/dist/commonjs/v4/classic/parse.js +2 -2
  6. package/dist/commonjs/v4/core/errors.d.ts +1 -1
  7. package/dist/commonjs/v4/core/errors.js +44 -0
  8. package/dist/commonjs/v4/core/parse.js +2 -2
  9. package/dist/esm/v3/types.d.ts +1 -1
  10. package/dist/esm/v4/classic/errors.d.ts +1 -1
  11. package/dist/esm/v4/classic/errors.js +1 -0
  12. package/dist/esm/v4/classic/parse.d.ts +1 -1
  13. package/dist/esm/v4/classic/parse.js +3 -3
  14. package/dist/esm/v4/core/errors.d.ts +1 -1
  15. package/dist/esm/v4/core/errors.js +11 -0
  16. package/dist/esm/v4/core/parse.js +2 -2
  17. package/package.json +1 -1
  18. package/src/v3/types.ts +1 -1
  19. package/src/v4/classic/errors.ts +2 -1
  20. package/src/v4/classic/parse.ts +3 -3
  21. package/src/v4/classic/tests/array.test.ts +42 -46
  22. package/src/v4/classic/tests/async-refinements.test.ts +14 -18
  23. package/src/v4/classic/tests/catch.test.ts +10 -12
  24. package/src/v4/classic/tests/discriminated-unions.test.ts +77 -87
  25. package/src/v4/classic/tests/enum.test.ts +33 -39
  26. package/src/v4/classic/tests/error-utils.test.ts +25 -27
  27. package/src/v4/classic/tests/error.test.ts +115 -128
  28. package/src/v4/classic/tests/literal.test.ts +10 -12
  29. package/src/v4/classic/tests/map.test.ts +60 -68
  30. package/src/v4/classic/tests/nested-refine.test.ts +68 -72
  31. package/src/v4/classic/tests/nonoptional.test.ts +36 -44
  32. package/src/v4/classic/tests/number.test.ts +36 -44
  33. package/src/v4/classic/tests/pipe.test.ts +18 -22
  34. package/src/v4/classic/tests/preprocess.test.ts +91 -107
  35. package/src/v4/classic/tests/primitive.test.ts +9 -11
  36. package/src/v4/classic/tests/record.test.ts +101 -121
  37. package/src/v4/classic/tests/set.test.ts +30 -36
  38. package/src/v4/classic/tests/string.test.ts +50 -60
  39. package/src/v4/classic/tests/template-literal.test.ts +45 -55
  40. package/src/v4/classic/tests/transform.test.ts +36 -46
  41. package/src/v4/classic/tests/tuple.test.ts +54 -66
  42. package/src/v4/core/errors.ts +12 -1
  43. package/src/v4/core/parse.ts +2 -2
  44. package/src/v4/core/tests/index.test.ts +42 -1
  45. package/src/v4/mini/tests/error.test.ts +1 -1
@@ -654,7 +654,7 @@ export type AnyZodTuple = ZodTuple<[ZodTypeAny, ...ZodTypeAny[]] | [], ZodTypeAn
654
654
  export declare class ZodTuple<T extends ZodTupleItems | [] = ZodTupleItems, Rest extends ZodTypeAny | null = null> extends ZodType<OutputTypeOfTupleWithRest<T, Rest>, ZodTupleDef<T, Rest>, InputTypeOfTupleWithRest<T, Rest>> {
655
655
  _parse(input: ParseInput): ParseReturnType<this["_output"]>;
656
656
  get items(): T;
657
- rest<Rest extends ZodTypeAny>(rest: Rest): ZodTuple<T, Rest>;
657
+ rest<RestSchema extends ZodTypeAny>(rest: RestSchema): ZodTuple<T, RestSchema>;
658
658
  static create: <Items extends [ZodTypeAny, ...ZodTypeAny[]] | []>(schemas: Items, params?: RawCreateParams) => ZodTuple<Items, null>;
659
659
  }
660
660
  export interface ZodRecordDef<Key extends KeySchema = ZodString, Value extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
@@ -2,7 +2,7 @@ import * as core from "zod/v4/core";
2
2
  import { $ZodError } from "zod/v4/core";
3
3
  /** @deprecated Use `z.core.$ZodIssue` from `@zod/core` instead, especially if you are building a library on top of Zod. */
4
4
  export type ZodIssue = core.$ZodIssue;
5
- /** An Error-like class that doesn't extend `Error`. Used inside safeParse. */
5
+ /** An Error-like class used to store Zod validation issues. */
6
6
  export interface ZodError<T = unknown> extends $ZodError<T> {
7
7
  /** @deprecated Use the `z.treeifyError(err)` function instead. */
8
8
  format(): core.$ZodFormattedError<T>;
@@ -38,6 +38,7 @@ const core = __importStar(require("zod/v4/core"));
38
38
  const core_1 = require("zod/v4/core");
39
39
  const initializer = (inst, issues) => {
40
40
  core_1.$ZodError.init(inst, issues);
41
+ inst.name = "ZodError";
41
42
  Object.defineProperties(inst, {
42
43
  format: {
43
44
  value: (mapper) => core.formatError(inst, mapper),
@@ -1,5 +1,5 @@
1
1
  import * as core from "zod/v4/core";
2
- import { ZodError } from "./errors.js";
2
+ import { type ZodError } from "./errors.js";
3
3
  export type ZodSafeParseResult<T> = ZodSafeParseSuccess<T> | ZodSafeParseError<T>;
4
4
  export type ZodSafeParseSuccess<T> = {
5
5
  success: true;
@@ -38,5 +38,5 @@ const core = __importStar(require("zod/v4/core"));
38
38
  const errors_js_1 = require("./errors.js");
39
39
  exports.parse = core._parse(errors_js_1.ZodRealError);
40
40
  exports.parseAsync = core._parseAsync(errors_js_1.ZodRealError);
41
- exports.safeParse = core._safeParse(errors_js_1.ZodError);
42
- exports.safeParseAsync = core._safeParseAsync(errors_js_1.ZodError);
41
+ exports.safeParse = core._safeParse(errors_js_1.ZodRealError);
42
+ exports.safeParseAsync = core._safeParseAsync(errors_js_1.ZodRealError);
@@ -1,7 +1,7 @@
1
1
  import type { $ZodCheck, $ZodStringFormats } from "./checks.js";
2
2
  import { $constructor } from "./core.js";
3
3
  import type { $ZodType } from "./schemas.js";
4
- import type * as util from "./util.js";
4
+ import * as util from "./util.js";
5
5
  export interface $ZodIssueBase {
6
6
  readonly code?: string;
7
7
  readonly input?: unknown;
@@ -1,4 +1,37 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
2
35
  Object.defineProperty(exports, "__esModule", { value: true });
3
36
  exports.$ZodRealError = exports.$ZodError = void 0;
4
37
  exports.flattenError = flattenError;
@@ -7,15 +40,26 @@ exports.treeifyError = treeifyError;
7
40
  exports.toDotPath = toDotPath;
8
41
  exports.prettifyError = prettifyError;
9
42
  const core_js_1 = require("./core.js");
43
+ const util = __importStar(require("./util.js"));
10
44
  const initializer = (inst, def) => {
45
+ inst.name = "$ZodError";
11
46
  Object.defineProperty(inst, "_zod", {
12
47
  value: inst._zod,
13
48
  enumerable: false,
14
49
  });
15
50
  Object.defineProperty(inst, "issues", {
16
51
  value: def,
52
+ enumerable: false,
53
+ });
54
+ // inst.message = JSON.stringify(def, util.jsonStringifyReplacer, 2);
55
+ Object.defineProperty(inst, "message", {
56
+ get() {
57
+ return JSON.stringify(def, util.jsonStringifyReplacer, 2);
58
+ },
17
59
  enumerable: true,
60
+ // configurable: false,
18
61
  });
62
+ // inst.toString = () => inst.message;
19
63
  // inst.message = `Invalid input`;
20
64
  // Object.defineProperty(inst, "message", {
21
65
  // get() {
@@ -80,7 +80,7 @@ const _safeParse = (_Err) => (schema, value, _ctx) => {
80
80
  : { success: true, data: result.value };
81
81
  };
82
82
  exports._safeParse = _safeParse;
83
- exports.safeParse = (0, exports._safeParse)(errors.$ZodError);
83
+ exports.safeParse = (0, exports._safeParse)(errors.$ZodRealError);
84
84
  const _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
85
85
  const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
86
86
  let result = schema._zod.run({ value, issues: [] }, ctx);
@@ -94,4 +94,4 @@ const _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
94
94
  : { success: true, data: result.value };
95
95
  };
96
96
  exports._safeParseAsync = _safeParseAsync;
97
- exports.safeParseAsync = (0, exports._safeParseAsync)(errors.$ZodError);
97
+ exports.safeParseAsync = (0, exports._safeParseAsync)(errors.$ZodRealError);
@@ -654,7 +654,7 @@ export type AnyZodTuple = ZodTuple<[ZodTypeAny, ...ZodTypeAny[]] | [], ZodTypeAn
654
654
  export declare class ZodTuple<T extends ZodTupleItems | [] = ZodTupleItems, Rest extends ZodTypeAny | null = null> extends ZodType<OutputTypeOfTupleWithRest<T, Rest>, ZodTupleDef<T, Rest>, InputTypeOfTupleWithRest<T, Rest>> {
655
655
  _parse(input: ParseInput): ParseReturnType<this["_output"]>;
656
656
  get items(): T;
657
- rest<Rest extends ZodTypeAny>(rest: Rest): ZodTuple<T, Rest>;
657
+ rest<RestSchema extends ZodTypeAny>(rest: RestSchema): ZodTuple<T, RestSchema>;
658
658
  static create: <Items extends [ZodTypeAny, ...ZodTypeAny[]] | []>(schemas: Items, params?: RawCreateParams) => ZodTuple<Items, null>;
659
659
  }
660
660
  export interface ZodRecordDef<Key extends KeySchema = ZodString, Value extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
@@ -2,7 +2,7 @@ import * as core from "zod/v4/core";
2
2
  import { $ZodError } from "zod/v4/core";
3
3
  /** @deprecated Use `z.core.$ZodIssue` from `@zod/core` instead, especially if you are building a library on top of Zod. */
4
4
  export type ZodIssue = core.$ZodIssue;
5
- /** An Error-like class that doesn't extend `Error`. Used inside safeParse. */
5
+ /** An Error-like class used to store Zod validation issues. */
6
6
  export interface ZodError<T = unknown> extends $ZodError<T> {
7
7
  /** @deprecated Use the `z.treeifyError(err)` function instead. */
8
8
  format(): core.$ZodFormattedError<T>;
@@ -2,6 +2,7 @@ import * as core from "zod/v4/core";
2
2
  import { $ZodError } from "zod/v4/core";
3
3
  const initializer = (inst, issues) => {
4
4
  $ZodError.init(inst, issues);
5
+ inst.name = "ZodError";
5
6
  Object.defineProperties(inst, {
6
7
  format: {
7
8
  value: (mapper) => core.formatError(inst, mapper),
@@ -1,5 +1,5 @@
1
1
  import * as core from "zod/v4/core";
2
- import { ZodError } from "./errors.js";
2
+ import { type ZodError } from "./errors.js";
3
3
  export type ZodSafeParseResult<T> = ZodSafeParseSuccess<T> | ZodSafeParseError<T>;
4
4
  export type ZodSafeParseSuccess<T> = {
5
5
  success: true;
@@ -1,6 +1,6 @@
1
1
  import * as core from "zod/v4/core";
2
- import { ZodError, ZodRealError } from "./errors.js";
2
+ import { ZodRealError } from "./errors.js";
3
3
  export const parse = /* @__PURE__ */ core._parse(ZodRealError);
4
4
  export const parseAsync = /* @__PURE__ */ core._parseAsync(ZodRealError);
5
- export const safeParse = /* @__PURE__ */ core._safeParse(ZodError);
6
- export const safeParseAsync = /* @__PURE__ */ core._safeParseAsync(ZodError);
5
+ export const safeParse = /* @__PURE__ */ core._safeParse(ZodRealError);
6
+ export const safeParseAsync = /* @__PURE__ */ core._safeParseAsync(ZodRealError);
@@ -1,7 +1,7 @@
1
1
  import type { $ZodCheck, $ZodStringFormats } from "./checks.js";
2
2
  import { $constructor } from "./core.js";
3
3
  import type { $ZodType } from "./schemas.js";
4
- import type * as util from "./util.js";
4
+ import * as util from "./util.js";
5
5
  export interface $ZodIssueBase {
6
6
  readonly code?: string;
7
7
  readonly input?: unknown;
@@ -1,13 +1,24 @@
1
1
  import { $constructor } from "./core.js";
2
+ import * as util from "./util.js";
2
3
  const initializer = (inst, def) => {
4
+ inst.name = "$ZodError";
3
5
  Object.defineProperty(inst, "_zod", {
4
6
  value: inst._zod,
5
7
  enumerable: false,
6
8
  });
7
9
  Object.defineProperty(inst, "issues", {
8
10
  value: def,
11
+ enumerable: false,
12
+ });
13
+ // inst.message = JSON.stringify(def, util.jsonStringifyReplacer, 2);
14
+ Object.defineProperty(inst, "message", {
15
+ get() {
16
+ return JSON.stringify(def, util.jsonStringifyReplacer, 2);
17
+ },
9
18
  enumerable: true,
19
+ // configurable: false,
10
20
  });
21
+ // inst.toString = () => inst.message;
11
22
  // inst.message = `Invalid input`;
12
23
  // Object.defineProperty(inst, "message", {
13
24
  // get() {
@@ -41,7 +41,7 @@ export const _safeParse = (_Err) => (schema, value, _ctx) => {
41
41
  }
42
42
  : { success: true, data: result.value };
43
43
  };
44
- export const safeParse = /* @__PURE__*/ _safeParse(errors.$ZodError);
44
+ export const safeParse = /* @__PURE__*/ _safeParse(errors.$ZodRealError);
45
45
  export const _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
46
46
  const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
47
47
  let result = schema._zod.run({ value, issues: [] }, ctx);
@@ -54,4 +54,4 @@ export const _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
54
54
  }
55
55
  : { success: true, data: result.value };
56
56
  };
57
- export const safeParseAsync = /* @__PURE__*/ _safeParseAsync(errors.$ZodError);
57
+ export const safeParseAsync = /* @__PURE__*/ _safeParseAsync(errors.$ZodRealError);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zod",
3
- "version": "3.25.4",
3
+ "version": "3.25.6",
4
4
  "type": "module",
5
5
  "author": "Colin McDonnell <zod@colinhacks.com>",
6
6
  "description": "TypeScript-first schema declaration and validation library with static type inference",
package/src/v3/types.ts CHANGED
@@ -3450,7 +3450,7 @@ export class ZodTuple<
3450
3450
  return this._def.items;
3451
3451
  }
3452
3452
 
3453
- rest<Rest extends ZodTypeAny>(rest: Rest): ZodTuple<T, Rest> {
3453
+ rest<RestSchema extends ZodTypeAny>(rest: RestSchema): ZodTuple<T, RestSchema> {
3454
3454
  return new ZodTuple({
3455
3455
  ...this._def,
3456
3456
  rest,
@@ -4,7 +4,7 @@ import { $ZodError } from "zod/v4/core";
4
4
  /** @deprecated Use `z.core.$ZodIssue` from `@zod/core` instead, especially if you are building a library on top of Zod. */
5
5
  export type ZodIssue = core.$ZodIssue;
6
6
 
7
- /** An Error-like class that doesn't extend `Error`. Used inside safeParse. */
7
+ /** An Error-like class used to store Zod validation issues. */
8
8
  export interface ZodError<T = unknown> extends $ZodError<T> {
9
9
  /** @deprecated Use the `z.treeifyError(err)` function instead. */
10
10
  format(): core.$ZodFormattedError<T>;
@@ -23,6 +23,7 @@ export interface ZodError<T = unknown> extends $ZodError<T> {
23
23
 
24
24
  const initializer = (inst: ZodError, issues: core.$ZodIssue[]) => {
25
25
  $ZodError.init(inst, issues);
26
+ inst.name = "ZodError";
26
27
  Object.defineProperties(inst, {
27
28
  format: {
28
29
  value: (mapper: any) => core.formatError(inst, mapper),
@@ -1,5 +1,5 @@
1
1
  import * as core from "zod/v4/core";
2
- import { ZodError, ZodRealError } from "./errors.js";
2
+ import { type ZodError, ZodRealError } from "./errors.js";
3
3
 
4
4
  export type ZodSafeParseResult<T> = ZodSafeParseSuccess<T> | ZodSafeParseError<T>;
5
5
  export type ZodSafeParseSuccess<T> = { success: true; data: T; error?: never };
@@ -24,10 +24,10 @@ export const safeParse: <T extends core.$ZodType>(
24
24
  value: unknown,
25
25
  _ctx?: core.ParseContext<core.$ZodIssue>
26
26
  // _params?: { callee?: core.util.AnyFunc; Err?: core.$ZodErrorClass }
27
- ) => ZodSafeParseResult<core.output<T>> = /* @__PURE__ */ core._safeParse(ZodError) as any;
27
+ ) => ZodSafeParseResult<core.output<T>> = /* @__PURE__ */ core._safeParse(ZodRealError) as any;
28
28
 
29
29
  export const safeParseAsync: <T extends core.$ZodType>(
30
30
  schema: T,
31
31
  value: unknown,
32
32
  _ctx?: core.ParseContext<core.$ZodIssue>
33
- ) => Promise<ZodSafeParseResult<core.output<T>>> = /* @__PURE__ */ core._safeParseAsync(ZodError) as any;
33
+ ) => Promise<ZodSafeParseResult<core.output<T>>> = /* @__PURE__ */ core._safeParseAsync(ZodRealError) as any;
@@ -108,28 +108,26 @@ test("continue parsing despite array size error", () => {
108
108
  });
109
109
  expect(result).toMatchInlineSnapshot(`
110
110
  {
111
- "error": ZodError {
112
- "issues": [
113
- {
114
- "code": "invalid_type",
115
- "expected": "string",
116
- "message": "Invalid input: expected string, received number",
117
- "path": [
118
- "people",
119
- 0,
120
- ],
121
- },
122
- {
123
- "code": "too_small",
124
- "message": "Too small: expected array to have >2 items",
125
- "minimum": 2,
126
- "origin": "array",
127
- "path": [
128
- "people",
129
- ],
130
- },
111
+ "error": [ZodError: [
112
+ {
113
+ "expected": "string",
114
+ "code": "invalid_type",
115
+ "path": [
116
+ "people",
117
+ 0
131
118
  ],
119
+ "message": "Invalid input: expected string, received number"
132
120
  },
121
+ {
122
+ "origin": "array",
123
+ "code": "too_small",
124
+ "minimum": 2,
125
+ "path": [
126
+ "people"
127
+ ],
128
+ "message": "Too small: expected array to have >2 items"
129
+ }
130
+ ]],
133
131
  "success": false,
134
132
  }
135
133
  `);
@@ -141,34 +139,32 @@ test("parse should fail given sparse array", () => {
141
139
  expect(result.success).toEqual(false);
142
140
  expect(result).toMatchInlineSnapshot(`
143
141
  {
144
- "error": ZodError {
145
- "issues": [
146
- {
147
- "code": "invalid_type",
148
- "expected": "string",
149
- "message": "Invalid input: expected string, received undefined",
150
- "path": [
151
- 0,
152
- ],
153
- },
154
- {
155
- "code": "invalid_type",
156
- "expected": "string",
157
- "message": "Invalid input: expected string, received undefined",
158
- "path": [
159
- 1,
160
- ],
161
- },
162
- {
163
- "code": "invalid_type",
164
- "expected": "string",
165
- "message": "Invalid input: expected string, received undefined",
166
- "path": [
167
- 2,
168
- ],
169
- },
142
+ "error": [ZodError: [
143
+ {
144
+ "expected": "string",
145
+ "code": "invalid_type",
146
+ "path": [
147
+ 0
148
+ ],
149
+ "message": "Invalid input: expected string, received undefined"
150
+ },
151
+ {
152
+ "expected": "string",
153
+ "code": "invalid_type",
154
+ "path": [
155
+ 1
170
156
  ],
157
+ "message": "Invalid input: expected string, received undefined"
171
158
  },
159
+ {
160
+ "expected": "string",
161
+ "code": "invalid_type",
162
+ "path": [
163
+ 2
164
+ ],
165
+ "message": "Invalid input: expected string, received undefined"
166
+ }
167
+ ]],
172
168
  "success": false,
173
169
  }
174
170
  `);
@@ -18,15 +18,13 @@ test("async refine", async () => {
18
18
  expect(r2.success).toBe(false);
19
19
  expect(r2).toMatchInlineSnapshot(`
20
20
  {
21
- "error": ZodError {
22
- "issues": [
23
- {
24
- "code": "custom",
25
- "message": "Invalid input",
26
- "path": [],
27
- },
28
- ],
29
- },
21
+ "error": [ZodError: [
22
+ {
23
+ "code": "custom",
24
+ "path": [],
25
+ "message": "Invalid input"
26
+ }
27
+ ]],
30
28
  "success": false,
31
29
  }
32
30
  `);
@@ -55,15 +53,13 @@ test("async refine that uses value", async () => {
55
53
  const r1 = await schema1.safeParseAsync("asdf");
56
54
  expect(r1.success).toBe(false);
57
55
  expect(r1.error).toMatchInlineSnapshot(`
58
- ZodError {
59
- "issues": [
60
- {
61
- "code": "custom",
62
- "message": "Invalid input",
63
- "path": [],
64
- },
65
- ],
66
- }
56
+ [ZodError: [
57
+ {
58
+ "code": "custom",
59
+ "path": [],
60
+ "message": "Invalid input"
61
+ }
62
+ ]]
67
63
  `);
68
64
 
69
65
  const r2 = await schema1.safeParseAsync("asdf123");
@@ -230,18 +230,16 @@ test("catch error", () => {
230
230
 
231
231
  expect(result.success).toEqual(false);
232
232
  expect(result.error!).toMatchInlineSnapshot(`
233
- ZodError {
234
- "issues": [
235
- {
236
- "code": "invalid_type",
237
- "expected": "number",
238
- "message": "Invalid input: expected number, received null",
239
- "path": [
240
- "age",
241
- ],
242
- },
243
- ],
244
- }
233
+ [ZodError: [
234
+ {
235
+ "expected": "number",
236
+ "code": "invalid_type",
237
+ "path": [
238
+ "age"
239
+ ],
240
+ "message": "Invalid input: expected number, received null"
241
+ }
242
+ ]]
245
243
  `);
246
244
  });
247
245