mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
### What When the `edge-instrumentation.js` is not built, we do not include it into the serve required manifest. We moved the write of required server files manifest to a late phase, where we used the edge routes counter to determine if we need to write the edge entry file of instrumentation into manifest x-ref: https://github.com/vercel/next.js/actions/runs/10416595866/job/28850695138
20 lines
588 B
TypeScript
20 lines
588 B
TypeScript
import { nextTestSetup } from 'e2e-utils'
|
|
|
|
async function readRequiredFilesManifest(next: any) {
|
|
const manifest = JSON.parse(
|
|
await next.readFile('.next/required-server-files.json')
|
|
)
|
|
return manifest.files
|
|
}
|
|
|
|
describe('instrumentation - required-files-instrumentation-entry', () => {
|
|
const { next } = nextTestSetup({
|
|
files: __dirname,
|
|
})
|
|
|
|
it('should not contain edge entry in required files manifest', async () => {
|
|
const requiredFiles = await readRequiredFilesManifest(next)
|
|
expect(requiredFiles).not.toContain('.next/server/edge-instrumentation.js')
|
|
})
|
|
})
|