Skip to content

Commit

Permalink
Update flakey rsc manifest test (#50506)
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk committed May 29, 2023
1 parent 679d864 commit 7adb273
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions test/e2e/app-dir/rsc-basic/rsc-basic.test.ts
Expand Up @@ -27,17 +27,21 @@ createNextDescribe(
if (isNextDev) {
it('should have correct client references keys in manifest', async () => {
await next.render('/')
// Check that the client-side manifest is correct before any requests
const clientReferenceManifest = JSON.parse(
await next.readFile('.next/server/client-reference-manifest.json')
)
const clientModulesNames = Object.keys(
clientReferenceManifest.clientModules
)
clientModulesNames.every((name) => {
const [, key] = name.split('#')
return key === undefined || key === '' || key === 'default'
})
await check(async () => {
// Check that the client-side manifest is correct before any requests
const clientReferenceManifest = JSON.parse(
await next.readFile('.next/server/client-reference-manifest.json')
)
const clientModulesNames = Object.keys(
clientReferenceManifest.clientModules
)
clientModulesNames.every((name) => {
const [, key] = name.split('#')
return key === undefined || key === '' || key === 'default'
})

return 'success'
}, 'success')
})
}

Expand Down

0 comments on commit 7adb273

Please sign in to comment.