Skip to content

Commit b76352e

Browse files
committed
test: enable prerender e2e tests after rollupOptions.input fix
- Enable previously skipped prerender tests for both serverless and edge sites. - The tests were disabled due to React Router issue #13226, but now work correctly after the rollupOptions.input merge fix in plugin.ts.
1 parent 812a8d0 commit b76352e

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

tests/e2e/fixtures/react-router-edge-site/react-router.config.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ export default {
44
// Config options...
55
// Server-side render by default, to enable SPA mode set this to `false`
66
ssr: true,
7-
// TODO(serhalp) Revisit this if RR team changes their minds:
8-
// https://github.com/remix-run/react-router/issues/13226#issuecomment-2776672461.
9-
// prerender: ['/prerendered'],
7+
// Previously disabled due to https://github.com/remix-run/react-router/issues/13226#issuecomment-2776672461.
8+
// Now enabled after fixing rollupOptions.input merge in plugin.ts to preserve existing entries
9+
// including 'virtual:react-router/server-build'.
10+
prerender: ['/prerendered'],
1011
} satisfies Config

tests/e2e/fixtures/react-router-serverless-site/react-router.config.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ export default {
44
// Config options...
55
// Server-side render by default, to enable SPA mode set this to `false`
66
ssr: true,
7-
// TODO(serhalp) Revisit this if RR team changes their minds:
8-
// https://github.com/remix-run/react-router/issues/13226#issuecomment-2776672461.
9-
// prerender: ['/prerendered'],
7+
// Previously disabled due to https://github.com/remix-run/react-router/issues/13226#issuecomment-2776672461.
8+
// Now enabled after fixing rollupOptions.input merge in plugin.ts to preserve existing entries
9+
// including 'virtual:react-router/server-build'.
10+
prerender: ['/prerendered'],
1011
} satisfies Config

tests/e2e/react-router-user-journeys.spec.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ test.describe('React Router user journeys', () => {
3333
expect(response?.headers()['cache-status']).toMatch(CACHE_STATUS_SERVED_FROM_EDGE)
3434
})
3535

36-
// TODO(serhalp) Revisit this if RR team changes their minds:
37-
// https://github.com/remix-run/react-router/issues/13226#issuecomment-2776672461.
38-
test.skip('serves a response from the CDN (without compute) for a pre-rendered route', async ({
36+
// Previously skipped due to https://github.com/remix-run/react-router/issues/13226#issuecomment-2776672461.
37+
// Now enabled after fixing rollupOptions.input merge in plugin.ts to preserve existing entries.
38+
test('serves a response from the CDN (without compute) for a pre-rendered route', async ({
3939
page,
4040
reactRouterServerlessSite,
4141
}) => {
@@ -177,9 +177,9 @@ test.describe('React Router user journeys', () => {
177177
expect(response?.headers()['cache-status']).toMatch(CACHE_STATUS_SERVED_FROM_EDGE)
178178
})
179179

180-
// TODO(serhalp) Revisit this if RR team changes their minds:
181-
// https://github.com/remix-run/react-router/issues/13226#issuecomment-2776672461.
182-
test.skip('serves a response from the CDN (without compute) for a pre-rendered route', async ({
180+
// Previously skipped due to https://github.com/remix-run/react-router/issues/13226#issuecomment-2776672461.
181+
// Now enabled after fixing rollupOptions.input merge in plugin.ts to preserve existing entries.
182+
test('serves a response from the CDN (without compute) for a pre-rendered route', async ({
183183
page,
184184
reactRouterEdgeSite,
185185
}) => {

0 commit comments

Comments
 (0)