Skip to content

Commit 30fe5d9

Browse files
committed
Update e2e test unstable-get-context file
1 parent f60fe64 commit 30fe5d9

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

integration/helpers/rsc-parcel/src/browser.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
setServerCallback,
1616
// @ts-expect-error - no types for this yet
1717
} from "react-server-dom-parcel/client";
18-
import { getContext } from "./config/unstable-get-context";
18+
import { getContext } from "./config/get-context";
1919

2020
// Create and set the callServer function to support post-hydration server actions.
2121
setServerCallback(

integration/helpers/rsc-parcel/src/config/unstable-get-context.ts renamed to integration/helpers/rsc-parcel/src/config/get-context.ts

File renamed without changes.

integration/helpers/rsc-vite/src/config/unstable-get-context.ts renamed to integration/helpers/rsc-vite/src/config/get-context.ts

File renamed without changes.

integration/helpers/rsc-vite/src/entry.browser.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
unstable_RSCHydratedRouter as RSCHydratedRouter,
1313
} from "react-router";
1414
import type { unstable_RSCPayload as RSCPayload } from "react-router";
15-
import { getContext } from "./config/unstable-get-context";
15+
import { getContext } from "./config/get-context";
1616

1717
setServerCallback(
1818
createCallServer({

integration/rsc/rsc-test.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -354,14 +354,14 @@ implementations.forEach((implementation) => {
354354
]
355355
},
356356
{
357-
id: "unstable-get-context",
358-
path: "unstable-get-context",
359-
lazy: () => import("./routes/unstable-get-context/root"),
357+
id: "get-context",
358+
path: "get-context",
359+
lazy: () => import("./routes/get-context/root"),
360360
children: [
361361
{
362-
id: "unstable-get-context.home",
362+
id: "get-context.home",
363363
index: true,
364-
lazy: () => import("./routes/unstable-get-context/home"),
364+
lazy: () => import("./routes/get-context/home"),
365365
},
366366
]
367367
},
@@ -528,7 +528,7 @@ implementations.forEach((implementation) => {
528528
new Map([[testContext, "test-context-value"]])
529529
);
530530
`,
531-
"src/config/unstable-get-context.ts": js`
531+
"src/config/get-context.ts": js`
532532
// THIS FILE OVERRIDES THE DEFAULT IMPLEMENTATION
533533
import { createContext } from "react-router";
534534
@@ -701,12 +701,12 @@ implementations.forEach((implementation) => {
701701
}
702702
`,
703703

704-
"src/routes/unstable-get-context/root.tsx": js`
704+
"src/routes/get-context/root.tsx": js`
705705
"use client";
706706
707707
import { Outlet } from "react-router";
708708
import type { ClientMiddlewareFunction } from "react-router";
709-
import { testContext } from "../../config/unstable-get-context";
709+
import { testContext } from "../../config/get-context";
710710
711711
export const clientMiddleware = [
712712
async ({ context }, next) => {
@@ -728,11 +728,11 @@ implementations.forEach((implementation) => {
728728
);
729729
}
730730
`,
731-
"src/routes/unstable-get-context/home.tsx": js`
731+
"src/routes/get-context/home.tsx": js`
732732
"use client";
733733
734734
import { useLoaderData } from "react-router";
735-
import { testContext } from "../../config/unstable-get-context";
735+
import { testContext } from "../../config/get-context";
736736
737737
export function clientLoader({ context }) {
738738
const contextValue = context.get(testContext);
@@ -1339,7 +1339,7 @@ implementations.forEach((implementation) => {
13391339
});
13401340

13411341
test("Supports client context using getContext", async ({ page }) => {
1342-
await page.goto(`http://localhost:${port}/unstable-get-context`);
1342+
await page.goto(`http://localhost:${port}/get-context`);
13431343
await page.waitForSelector("[data-client-context]");
13441344
expect(
13451345
await page.locator("[data-client-context]").textContent(),

0 commit comments

Comments
 (0)