diff --git a/test/integration/react-streaming-and-server-components/test/index.test.js b/test/integration/react-streaming-and-server-components/test/index.test.js index 826ca4d5d1428..79a161d66862a 100644 --- a/test/integration/react-streaming-and-server-components/test/index.test.js +++ b/test/integration/react-streaming-and-server-components/test/index.test.js @@ -69,16 +69,7 @@ export default function Page500() { } ` -describe('Edge runtime - basic', () => { - it('should warn user for experimental risk with server components', async () => { - const edgeRuntimeWarning = - 'You are using the experimental Edge Runtime with `experimental.runtime`.' - const rscWarning = `You have experimental React Server Components enabled. Continue at your own risk.` - const { stderr } = await nextBuild(appDir) - expect(stderr).toContain(edgeRuntimeWarning) - expect(stderr).toContain(rscWarning) - }) - +describe('Edge runtime - errors', () => { it('should warn user that native node APIs are not supported', async () => { const fsImportedErrorMessage = 'Native Node.js APIs are not supported in the Edge Runtime. Found `dns` imported.' @@ -93,7 +84,8 @@ describe('Edge runtime - prod', () => { beforeAll(async () => { error500Page.write(page500) context.appPort = await findPort() - await nextBuild(context.appDir) + const { stderr } = await nextBuild(context.appDir) + context.stderr = stderr context.server = await nextStart(context.appDir, context.appPort) }) afterAll(async () => { @@ -101,6 +93,14 @@ describe('Edge runtime - prod', () => { await killApp(context.server) }) + it('should warn user for experimental risk with edge runtime and server components', async () => { + const edgeRuntimeWarning = + 'You are using the experimental Edge Runtime with `experimental.runtime`.' + const rscWarning = `You have experimental React Server Components enabled. Continue at your own risk.` + expect(context.stderr).toContain(edgeRuntimeWarning) + expect(context.stderr).toContain(rscWarning) + }) + it('should generate middleware SSR manifests for edge runtime', async () => { const distServerDir = join(distDir, 'server') const files = [