Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
586616c4
Unverified
Commit
586616c4
authored
Feb 23, 2022
by
Shu Ding
Committed by
GitHub
Feb 23, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: Move test for streaming and RSC (#34724)
parent
33d96151
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
index.test.js
.../react-streaming-and-server-components/test/index.test.js
+11
-11
No files found.
test/integration/react-streaming-and-server-components/test/index.test.js
View file @
586616c4
...
@@ -69,16 +69,7 @@ export default function Page500() {
...
@@ -69,16 +69,7 @@ export default function Page500() {
}
}
`
`
describe
(
'Edge runtime - basic'
,
()
=>
{
describe
(
'Edge runtime - errors'
,
()
=>
{
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
)
})
it
(
'should warn user that native node APIs are not supported'
,
async
()
=>
{
it
(
'should warn user that native node APIs are not supported'
,
async
()
=>
{
const
fsImportedErrorMessage
=
const
fsImportedErrorMessage
=
'Native Node.js APIs are not supported in the Edge Runtime. Found `dns` imported.'
'Native Node.js APIs are not supported in the Edge Runtime. Found `dns` imported.'
...
@@ -93,7 +84,8 @@ describe('Edge runtime - prod', () => {
...
@@ -93,7 +84,8 @@ describe('Edge runtime - prod', () => {
beforeAll
(
async
()
=>
{
beforeAll
(
async
()
=>
{
error500Page
.
write
(
page500
)
error500Page
.
write
(
page500
)
context
.
appPort
=
await
findPort
()
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
)
context
.
server
=
await
nextStart
(
context
.
appDir
,
context
.
appPort
)
})
})
afterAll
(
async
()
=>
{
afterAll
(
async
()
=>
{
...
@@ -101,6 +93,14 @@ describe('Edge runtime - prod', () => {
...
@@ -101,6 +93,14 @@ describe('Edge runtime - prod', () => {
await
killApp
(
context
.
server
)
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
()
=>
{
it
(
'should generate middleware SSR manifests for edge runtime'
,
async
()
=>
{
const
distServerDir
=
join
(
distDir
,
'server'
)
const
distServerDir
=
join
(
distDir
,
'server'
)
const
files
=
[
const
files
=
[
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment