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
eea3adc5
Unverified
Commit
eea3adc5
authored
Jan 27, 2022
by
Jiachi Liu
Committed by
GitHub
Jan 27, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix rsc test suite runner (#33745)
parent
5f96a0b1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
12 deletions
+13
-12
index.test.js
.../react-streaming-and-server-components/test/index.test.js
+13
-12
No files found.
test/integration/react-streaming-and-server-components/test/index.test.js
View file @
eea3adc5
...
@@ -221,8 +221,8 @@ const customAppPageSuite = {
...
@@ -221,8 +221,8 @@ const customAppPageSuite = {
expect
(
indexFlight
).
toContain
(
'container-server'
)
expect
(
indexFlight
).
toContain
(
'container-server'
)
})
})
},
},
before
:
()
=>
appServerPage
.
write
(
rscAppPage
),
before
All
:
()
=>
appServerPage
.
write
(
rscAppPage
),
after
:
()
=>
appServerPage
.
delete
(),
after
All
:
()
=>
appServerPage
.
delete
(),
}
}
runSuite
(
'Custom App'
,
'dev'
,
customAppPageSuite
)
runSuite
(
'Custom App'
,
'dev'
,
customAppPageSuite
)
...
@@ -267,8 +267,8 @@ describe('concurrentFeatures - dev', () => {
...
@@ -267,8 +267,8 @@ describe('concurrentFeatures - dev', () => {
const
cssSuite
=
{
const
cssSuite
=
{
runTests
:
css
,
runTests
:
css
,
before
:
()
=>
appPage
.
write
(
appWithGlobalCss
),
before
All
:
()
=>
appPage
.
write
(
appWithGlobalCss
),
after
:
()
=>
appPage
.
delete
(),
after
All
:
()
=>
appPage
.
delete
(),
}
}
runSuite
(
'CSS'
,
'dev'
,
cssSuite
)
runSuite
(
'CSS'
,
'dev'
,
cssSuite
)
...
@@ -286,8 +286,8 @@ const documentSuite = {
...
@@ -286,8 +286,8 @@ const documentSuite = {
)
)
})
})
},
},
before
:
()
=>
documentPage
.
write
(
documentWithGip
),
before
All
:
()
=>
documentPage
.
write
(
documentWithGip
),
after
:
()
=>
documentPage
.
delete
(),
after
All
:
()
=>
documentPage
.
delete
(),
}
}
runSuite
(
'document'
,
'dev'
,
documentSuite
)
runSuite
(
'document'
,
'dev'
,
documentSuite
)
...
@@ -333,28 +333,29 @@ async function runBasicTests(context, env) {
...
@@ -333,28 +333,29 @@ async function runBasicTests(context, env) {
streaming
(
context
)
streaming
(
context
)
}
}
function
runSuite
(
suiteName
,
env
,
{
runTests
,
before
,
after
}
)
{
function
runSuite
(
suiteName
,
env
,
options
)
{
const
context
=
{
appDir
}
const
context
=
{
appDir
}
describe
(
`
${
suiteName
}
${
env
}
`
,
()
=>
{
describe
(
`
${
suiteName
}
${
env
}
`
,
()
=>
{
if
(
env
===
'prod'
)
{
if
(
env
===
'prod'
)
{
beforeAll
(
async
()
=>
{
beforeAll
(
async
()
=>
{
before
?.()
options
.
beforeAll
?.()
context
.
appPort
=
await
findPort
()
context
.
appPort
=
await
findPort
()
context
.
server
=
await
nextDev
(
context
.
appDir
,
context
.
appPort
)
await
nextBuild
(
context
.
appDir
)
context
.
server
=
await
nextStart
(
context
.
appDir
,
context
.
appPort
)
})
})
}
}
if
(
env
===
'dev'
)
{
if
(
env
===
'dev'
)
{
beforeAll
(
async
()
=>
{
beforeAll
(
async
()
=>
{
before
?.()
options
.
beforeAll
?.()
context
.
appPort
=
await
findPort
()
context
.
appPort
=
await
findPort
()
context
.
server
=
await
nextDev
(
context
.
appDir
,
context
.
appPort
)
context
.
server
=
await
nextDev
(
context
.
appDir
,
context
.
appPort
)
})
})
}
}
afterAll
(
async
()
=>
{
afterAll
(
async
()
=>
{
after
?.()
options
.
afterAll
?.()
await
killApp
(
context
.
server
)
await
killApp
(
context
.
server
)
})
})
runTests
(
context
,
env
)
options
.
runTests
(
context
,
env
)
})
})
}
}
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