Skip to content

Commit b6c2b1a

Browse files
committed
fix test
1 parent 9de7d42 commit b6c2b1a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/react-router/__tests__/router/instrumentation-test.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1283,15 +1283,19 @@ describe("instrumentation", () => {
12831283
let A = await t.navigate("/page");
12841284
expect(spy).toHaveBeenNthCalledWith(1, "outer-start");
12851285
expect(spy).toHaveBeenNthCalledWith(2, "inner-start");
1286-
await A.loaders.page.reject(data({ message: "hello" }, { status: 418 }));
1286+
await A.loaders.page.reject(
1287+
data({ message: "hello" }, { status: 418, statusText: "I'm a teapot" }),
1288+
);
12871289
expect(spy).toHaveBeenNthCalledWith(3, "inner-end");
12881290
expect(spy).toHaveBeenNthCalledWith(4, "outer-end");
12891291
expect(t.router.state).toMatchObject({
12901292
navigation: { state: "idle" },
12911293
location: { pathname: "/page" },
12921294
loaderData: {},
12931295
errors: {
1294-
page: new ErrorResponseImpl(418, "", { message: "hello" }),
1296+
page: new ErrorResponseImpl(418, "I'm a teapot", {
1297+
message: "hello",
1298+
}),
12951299
},
12961300
});
12971301
});

0 commit comments

Comments
 (0)