Skip to content

Commit 1e00f95

Browse files
committed
Fix tests on node 22
1 parent f815a46 commit 1e00f95

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/router/__tests__/navigation-test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ describe("navigations", () => {
175175
process.version.startsWith("v16") || process.version.startsWith("v18")
176176
? "Unexpected token } in JSON at position 15"
177177
: "Unexpected non-whitespace character after JSON at position 15";
178-
expect(t.router.state.errors?.foo).toEqual(new SyntaxError(expected));
178+
expect(t.router.state.errors?.foo.message).toContain(expected);
179179
});
180180

181181
it("bubbles errors when unwrapping Responses", async () => {
@@ -212,7 +212,7 @@ describe("navigations", () => {
212212
process.version.startsWith("v16") || process.version.startsWith("v18")
213213
? "Unexpected token } in JSON at position 15"
214214
: "Unexpected non-whitespace character after JSON at position 15";
215-
expect(t.router.state.errors?.root).toEqual(new SyntaxError(expected));
215+
expect(t.router.state.errors?.root.message).toContain(expected);
216216
});
217217

218218
it("does not fetch unchanging layout data", async () => {

0 commit comments

Comments
 (0)