Unverified Commit 7adb273b authored by JJ Kasper's avatar JJ Kasper Committed by GitHub
parent 679d864c
......@@ -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')
})
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment