Skip to content
TypeScript

test(web): say why the useStableCallback test renders without a router (#25493)

Julius Marminge7d3208cbea86
diff --git a/apps/web/src/hooks/useStableCallback.browser.test.tsx b/apps/web/src/hooks/useStableCallback.browser.test.tsx
index 87742379f1e..ba331eff0e6 100644
--- a/apps/web/src/hooks/useStableCallback.browser.test.tsx
+++ b/apps/web/src/hooks/useStableCallback.browser.test.tsx
@@ -21,6 +21,7 @@ describe("useStableCallback", () => {
// child must still reach the handler of the render it commits with.
it("calls the committing render's function from a child layout effect", async () => {
const seen: string[] = [];
+ // A plain hook test; a router would add its own commits around the rerender.
await using screen = await render(<Parent value="first" seen={seen} />, { router: false });
await screen.rerender(<Parent value="second" seen={seen} />);
expect(seen).toEqual(["first->first", "second->second"]);