diff --git a/test/integration/react-streaming-and-server-components/switchable-runtime/pages/node-rsc-ssg.server.js b/test/integration/react-streaming-and-server-components/switchable-runtime/pages/node-rsc-ssg.server.js
new file mode 100644
index 000000000000..362e634644eb
--- /dev/null
+++ b/test/integration/react-streaming-and-server-components/switchable-runtime/pages/node-rsc-ssg.server.js
@@ -0,0 +1,26 @@
+import getRuntime from '../utils/runtime'
+import getTime from '../utils/time'
+
+export default function Page({ type }) {
+ return (
+
+ This is a {type} RSC page.
+
+ {'Runtime: ' + getRuntime()}
+
+ {'Time: ' + getTime()}
+
+ )
+}
+
+export function getStaticProps() {
+ return {
+ props: {
+ type: 'SSG',
+ },
+ }
+}
+
+export const config = {
+ runtime: 'nodejs',
+}
diff --git a/test/integration/react-streaming-and-server-components/switchable-runtime/pages/node-rsc-ssr.server.js b/test/integration/react-streaming-and-server-components/switchable-runtime/pages/node-rsc-ssr.server.js
new file mode 100644
index 000000000000..1b8b01526a3c
--- /dev/null
+++ b/test/integration/react-streaming-and-server-components/switchable-runtime/pages/node-rsc-ssr.server.js
@@ -0,0 +1,26 @@
+import getRuntime from '../utils/runtime'
+import getTime from '../utils/time'
+
+export default function Page({ type }) {
+ return (
+
+ This is a {type} RSC page.
+
+ {'Runtime: ' + getRuntime()}
+
+ {'Time: ' + getTime()}
+
+ )
+}
+
+export function getServerSideProps() {
+ return {
+ props: {
+ type: 'SSR',
+ },
+ }
+}
+
+export const config = {
+ runtime: 'nodejs',
+}
diff --git a/test/integration/react-streaming-and-server-components/switchable-runtime/pages/node-ssg.js b/test/integration/react-streaming-and-server-components/switchable-runtime/pages/node-ssg.js
new file mode 100644
index 000000000000..d555009acfcd
--- /dev/null
+++ b/test/integration/react-streaming-and-server-components/switchable-runtime/pages/node-ssg.js
@@ -0,0 +1,26 @@
+import getRuntime from '../utils/runtime'
+import getTime from '../utils/time'
+
+export default function Page({ type }) {
+ return (
+
+ This is a {type} page.
+
+ {'Runtime: ' + getRuntime()}
+
+ {'Time: ' + getTime()}
+
+ )
+}
+
+export function getStaticProps() {
+ return {
+ props: {
+ type: 'SSG',
+ },
+ }
+}
+
+export const config = {
+ runtime: 'nodejs',
+}
diff --git a/test/integration/react-streaming-and-server-components/switchable-runtime/pages/node-ssr.js b/test/integration/react-streaming-and-server-components/switchable-runtime/pages/node-ssr.js
new file mode 100644
index 000000000000..e58276b47a76
--- /dev/null
+++ b/test/integration/react-streaming-and-server-components/switchable-runtime/pages/node-ssr.js
@@ -0,0 +1,26 @@
+import getRuntime from '../utils/runtime'
+import getTime from '../utils/time'
+
+export default function Page({ type }) {
+ return (
+
+ This is a {type} page.
+
+ {'Runtime: ' + getRuntime()}
+
+ {'Time: ' + getTime()}
+
+ )
+}
+
+export function getServerSideProps() {
+ return {
+ props: {
+ type: 'SSR',
+ },
+ }
+}
+
+export const config = {
+ runtime: 'nodejs',
+}
diff --git a/test/integration/react-streaming-and-server-components/test/switchable-runtime.test.js b/test/integration/react-streaming-and-server-components/test/switchable-runtime.test.js
index f988267ffccb..249d149d4846 100644
--- a/test/integration/react-streaming-and-server-components/test/switchable-runtime.test.js
+++ b/test/integration/react-streaming-and-server-components/test/switchable-runtime.test.js
@@ -78,6 +78,20 @@ describe('Without global runtime configuration', () => {
})
})
+ it('should build /node-ssr as a dynamic page with the nodejs runtime', async () => {
+ await testRoute(context.appPort, '/node-ssr', {
+ isStatic: false,
+ isEdge: false,
+ })
+ })
+
+ it('should build /node-ssg as a static page with the nodejs runtime', async () => {
+ await testRoute(context.appPort, '/node-ssg', {
+ isStatic: true,
+ isEdge: false,
+ })
+ })
+
it('should build /node-rsc as a static page with the nodejs runtime', async () => {
await testRoute(context.appPort, '/node-rsc', {
isStatic: true,
@@ -85,6 +99,20 @@ describe('Without global runtime configuration', () => {
})
})
+ it('should build /node-rsc-ssr as a dynamic page with the nodejs runtime', async () => {
+ await testRoute(context.appPort, '/node-rsc-ssr', {
+ isStatic: false,
+ isEdge: false,
+ })
+ })
+
+ it('should build /node-rsc-ssg as a static page with the nodejs runtime', async () => {
+ await testRoute(context.appPort, '/node-rsc-ssg', {
+ isStatic: true,
+ isEdge: false,
+ })
+ })
+
it('should build /edge as a dynamic page with the edge runtime', async () => {
await testRoute(context.appPort, '/edge', {
isStatic: false,