Skip to content

Commit efa0833

Browse files
Revert Zod change
1 parent 59f3830 commit efa0833

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

configurations/vitest/setup.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import {expect} from 'vitest'
2+
import {z} from 'zod'
23

34
process.env.SHOPIFY_UNIT_TEST = '1'
45
process.removeAllListeners('warning')
@@ -7,9 +8,8 @@ process.removeAllListeners('warning')
78
// https://github.com/vitest-dev/vitest/issues/7315#issuecomment-2606572923
89
expect.addEqualityTesters([
910
function (a, b) {
10-
// Lazy check for ZodError to avoid importing zod eagerly
11-
const aOk = a?.constructor?.name === 'ZodError' && 'issues' in a
12-
const bOk = b?.constructor?.name === 'ZodError' && 'issues' in b
11+
const aOk = a instanceof z.ZodError
12+
const bOk = b instanceof z.ZodError
1313
if (aOk && bOk) {
1414
return this.equals(a.message, b.message) && this.equals(a.issues, b.issues)
1515
}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@
7777
"tmp": "^0.2.5",
7878
"ts-node": "^10.9.1",
7979
"typescript": "5.9.3",
80-
"vitest": "^3.1.4"
80+
"vitest": "^3.1.4",
81+
"zod": "3.24.4"
8182
},
8283
"workspaces": {
8384
"packages": [

pnpm-lock.yaml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)