Unverified Commit fbdbd453 authored by vercel-fleet-prod[bot]'s avatar vercel-fleet-prod[bot] Committed by GitHub

test: unify build-trace-extra-entries test

Co-authored-by: 's avatarNiklas Mischkulnig <4586894+mischnic@users.noreply.github.com>
Co-authored-by: 's avatarTobias Koppers <1365881+sokra@users.noreply.github.com>
parent c2e4f05f
......@@ -8,7 +8,12 @@ describe('build trace with extra entries', () => {
skipStart: true,
skipDeployment: true,
})
if (skipped) return
//
//
//
//
it('should build and trace correctly', async () => {
const { exitCode } = await next.build()
......@@ -30,19 +35,31 @@ describe('build trace with extra entries', () => {
await next.readFile('.next/server/app/route1/route.js.nft.json')
)
expect(appDirRoute1Trace.files).toContain(
'../../../../include-me/hello.txt'
)
expect(appDirRoute1Trace.files).toContain(
'../../../../include-me/second.txt'
)
expect(
appDirRoute1Trace.files.some(
(file: string) => file === '../../../../include-me/hello.txt'
(file: string) => file === '../../../../include-me-global.txt'
)
).toBe(true)
expect(
appDirRoute1Trace.files.some(
(file: string) => file === '../../../../include-me/second.txt'
appDirRoute1Trace.files.some((file: string) =>
file.includes('exclude-me')
)
).toBe(true)
).toBe(false)
expect(appDirRoute1Trace.files).toEqual(
expect.arrayContaining([
'../../../../node_modules/pkg-behind-symlink/index.js',
'../../../../node_modules/pkg-behind-symlink/package.json',
])
)
expect(
appDirRoute1Trace.files.some((file: string) =>
file.includes('exclude-me')
file.startsWith('../../../../node_modules/pkg/')
)
).toBe(false)
......
......@@ -3,13 +3,15 @@ import { nextTestSetup } from 'e2e-utils'
describe('build trace with extra entries', () => {
describe('production mode', () => {
const { next, isNextStart, isTurbopack } = nextTestSetup({
const { next, isTurbopack, skipped } = nextTestSetup({
files: path.join(__dirname, 'app'),
skipStart: true,
skipDeployment: true,
})
if (!isNextStart || isTurbopack) {
it('skipped for non-start or turbopack mode', () => {})
if (skipped) return
if (isTurbopack) {
it('skipped', () => {})
return
}
......
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