Skip to content

Commit 925aee4

Browse files
committed
test(rsc): tweak timeout + remove unused
1 parent c8ecad0 commit 925aee4

File tree

2 files changed

+7
-23
lines changed

2 files changed

+7
-23
lines changed

packages/plugin-rsc/e2e/helper.ts

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,13 @@ export const testNoJs = test.extend({
66

77
export async function waitForHydration(page: Page) {
88
await expect
9-
.poll(
10-
() =>
11-
page
12-
.locator('body')
13-
.evaluate(
14-
(el) =>
15-
el &&
16-
Object.keys(el).some((key) => key.startsWith('__reactFiber')),
17-
),
18-
{ timeout: 3000 },
9+
.poll(() =>
10+
page
11+
.locator('body')
12+
.evaluate(
13+
(el) =>
14+
el && Object.keys(el).some((key) => key.startsWith('__reactFiber')),
15+
),
1916
)
2017
.toBeTruthy()
2118
}

packages/plugin-rsc/examples/react-router/cf/vite.config.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,6 @@ export default defineConfig({
3636
},
3737
],
3838
}),
39-
{
40-
name: 'react-router-fixup',
41-
transform(code) {
42-
if (code.includes(`import { AsyncLocalStorage } from 'async_hooks';`)) {
43-
code = code.replaceAll('async_hooks', 'node:async_hooks')
44-
code = code.replaceAll(
45-
`global.___reactRouterServerStorage___`,
46-
`globalThis.___reactRouterServerStorage___`,
47-
)
48-
return code
49-
}
50-
},
51-
},
5239
],
5340
environments: {
5441
client: {

0 commit comments

Comments
 (0)