Unverified Commit 7adb273b authored by JJ Kasper's avatar JJ Kasper Committed by GitHub
parent 679d864c
...@@ -27,17 +27,21 @@ createNextDescribe( ...@@ -27,17 +27,21 @@ createNextDescribe(
if (isNextDev) { if (isNextDev) {
it('should have correct client references keys in manifest', async () => { it('should have correct client references keys in manifest', async () => {
await next.render('/') await next.render('/')
// Check that the client-side manifest is correct before any requests await check(async () => {
const clientReferenceManifest = JSON.parse( // Check that the client-side manifest is correct before any requests
await next.readFile('.next/server/client-reference-manifest.json') const clientReferenceManifest = JSON.parse(
) await next.readFile('.next/server/client-reference-manifest.json')
const clientModulesNames = Object.keys( )
clientReferenceManifest.clientModules const clientModulesNames = Object.keys(
) clientReferenceManifest.clientModules
clientModulesNames.every((name) => { )
const [, key] = name.split('#') clientModulesNames.every((name) => {
return key === undefined || key === '' || key === 'default' 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