Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a6b4e28

Browse files
committed
skip for emulated serverless
1 parent 878fd21 commit a6b4e28

File tree

1 file changed

+21
-19
lines changed

1 file changed

+21
-19
lines changed

test/integration/prerender/test/index.test.js

+21-19
Original file line numberDiff line numberDiff line change
@@ -576,29 +576,31 @@ const runTests = (dev = false, isEmulatedServerless = false) => {
576576
expect(value).toMatch(/Hi \[second\]!/)
577577
})
578578

579-
it('should not return data for fallback: false and missing dynamic page', async () => {
580-
const res1 = await fetchViaHTTP(
581-
appPort,
582-
`/_next/data/${buildId}/dynamic/oopsie.json`
583-
)
584-
expect(res1.status).toBe(404)
579+
if (!isEmulatedServerless) {
580+
it('should not return data for fallback: false and missing dynamic page', async () => {
581+
const res1 = await fetchViaHTTP(
582+
appPort,
583+
`/_next/data/${buildId}/dynamic/oopsie.json`
584+
)
585+
expect(res1.status).toBe(404)
585586

586-
await waitFor(500)
587+
await waitFor(500)
587588

588-
const res2 = await fetchViaHTTP(
589-
appPort,
590-
`/_next/data/${buildId}/dynamic/oopsie.json`
591-
)
592-
expect(res2.status).toBe(404)
589+
const res2 = await fetchViaHTTP(
590+
appPort,
591+
`/_next/data/${buildId}/dynamic/oopsie.json`
592+
)
593+
expect(res2.status).toBe(404)
593594

594-
await waitFor(500)
595+
await waitFor(500)
595596

596-
const res3 = await fetchViaHTTP(
597-
appPort,
598-
`/_next/data/${buildId}/dynamic/oopsie.json`
599-
)
600-
expect(res3.status).toBe(404)
601-
})
597+
const res3 = await fetchViaHTTP(
598+
appPort,
599+
`/_next/data/${buildId}/dynamic/oopsie.json`
600+
)
601+
expect(res3.status).toBe(404)
602+
})
603+
}
602604

603605
it('should SSR catch-all page with brackets in param as string', async () => {
604606
const html = await renderViaHTTP(

0 commit comments

Comments
 (0)