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
bcf4802b
Unverified
Commit
bcf4802b
authored
Jul 05, 2022
by
JJ Kasper
Committed by
GitHub
Jul 05, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update some flaking tests for edge compiler and rsc (#38344)
parent
764f7d42
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
5 deletions
+18
-5
index.test.ts
...e2e/edge-compiler-module-exports-preference/index.test.ts
+13
-3
rsc.js
test/integration/react-server-components/test/rsc.js
+5
-2
No files found.
test/e2e/edge-compiler-module-exports-preference/index.test.ts
View file @
bcf4802b
...
@@ -25,15 +25,25 @@ describe('Edge compiler module exports preference', () => {
...
@@ -25,15 +25,25 @@ describe('Edge compiler module exports preference', () => {
})
})
}
}
`
,
`
,
'
node_modules/
my-lib/package.json'
:
JSON
.
stringify
({
'my-lib/package.json'
:
JSON
.
stringify
({
name
:
'my-lib'
,
name
:
'my-lib'
,
version
:
'1.0.0'
,
version
:
'1.0.0'
,
main
:
'index.js'
,
main
:
'index.js'
,
browser
:
'browser.js'
,
browser
:
'browser.js'
,
}),
}),
'
node_modules/
my-lib/index.js'
:
`module.exports = "Node.js"`
,
'my-lib/index.js'
:
`module.exports = "Node.js"`
,
'
node_modules/
my-lib/browser.js'
:
`module.exports = "Browser"`
,
'my-lib/browser.js'
:
`module.exports = "Browser"`
,
},
},
packageJson
:
{
scripts
:
{
setup
:
`cp -r ./my-lib ./node_modules`
,
build
:
'yarn setup && next build'
,
dev
:
'yarn setup && next dev'
,
start
:
'next start'
,
},
},
startCommand
:
(
global
as
any
).
isNextDev
?
'yarn dev'
:
'yarn start'
,
buildCommand
:
'yarn build'
,
dependencies
:
{},
dependencies
:
{},
})
})
})
})
...
...
test/integration/react-server-components/test/rsc.js
View file @
bcf4802b
...
@@ -236,10 +236,13 @@ export default function (context, { runtime, env }) {
...
@@ -236,10 +236,13 @@ export default function (context, { runtime, env }) {
expect
(
hasFlightRequest
).
toBe
(
false
)
expect
(
hasFlightRequest
).
toBe
(
false
)
}
}
await
browser
.
elementByCss
(
selector
).
click
()
await
browser
.
elementByCss
(
selector
).
click
()
// wait for re-hydration
// wait for re-hydration
await
new
Promise
((
res
)
=>
setTimeout
(
res
,
1000
))
if
(
env
===
'dev'
)
{
if
(
env
===
'dev'
)
{
expect
(
hasFlightRequest
).
toBe
(
true
)
await
check
(
()
=>
(
hasFlightRequest
?
'success'
:
hasFlightRequest
),
'success'
)
}
}
const
refreshText
=
await
browser
.
elementByCss
(
selector
).
text
()
const
refreshText
=
await
browser
.
elementByCss
(
selector
).
text
()
expect
(
refreshText
).
toBe
(
'next link'
)
expect
(
refreshText
).
toBe
(
'next link'
)
...
...
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