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
490dc864
Unverified
Commit
490dc864
authored
Apr 21, 2023
by
Shu Ding
Committed by
GitHub
Apr 21, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test case for #48506 (#48696)
Closes NEXT-228 Closes NEXT-227
parent
b5f7f844
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
0 deletions
+25
-0
page.js
test/e2e/app-dir/rsc-basic/app/app-react/page.js
+5
-0
pages-react.js
test/e2e/app-dir/rsc-basic/pages/pages-react.js
+5
-0
rsc-basic.test.ts
test/e2e/app-dir/rsc-basic/rsc-basic.test.ts
+15
-0
No files found.
test/e2e/app-dir/rsc-basic/app/app-react/page.js
0 → 100644
View file @
490dc864
import
React
from
'react'
export
default
function
Page
()
{
return
<
div
>
{
'version='
+
React
.
version
}
<
/div
>
}
test/e2e/app-dir/rsc-basic/pages/pages-react.js
0 → 100644
View file @
490dc864
import
React
from
'react'
export
default
function
Page
()
{
return
<
div
>
{
'version='
+
React
.
version
}
<
/div
>
}
test/e2e/app-dir/rsc-basic/rsc-basic.test.ts
View file @
490dc864
...
@@ -433,6 +433,21 @@ describe('app dir - rsc basics', () => {
...
@@ -433,6 +433,21 @@ describe('app dir - rsc basics', () => {
expect
(
await
res
.
text
()).
toBe
(
'Hello from import-test.js'
)
expect
(
await
res
.
text
()).
toBe
(
'Hello from import-test.js'
)
})
})
it
(
'should use stable react for pages'
,
async
()
=>
{
const
resPages
=
await
next
.
fetch
(
'/pages-react'
)
const
versionPages
=
(
await
resPages
.
text
()).
match
(
/<div>version=
([^
<
]
+
)
<
\/
div>/
)?.[
1
]
const
resApp
=
await
next
.
fetch
(
'/app-react'
)
const
versionApp
=
(
await
resApp
.
text
()).
match
(
/<div>version=
([^
<
]
+
)
<
\/
div>/
)?.[
1
]
expect
(
versionPages
).
not
.
toInclude
(
'-next-'
)
expect
(
versionApp
).
toInclude
(
'-next-'
)
})
// disable this flaky test
// disable this flaky test
it
.
skip
(
'should support partial hydration with inlined server data in browser'
,
async
()
=>
{
it
.
skip
(
'should support partial hydration with inlined server data in browser'
,
async
()
=>
{
// Should end up with "next_streaming_data".
// Should end up with "next_streaming_data".
...
...
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