Unverified Commit 8c81cbb3 authored by Sebastian "Sebbie" Silbermann's avatar Sebastian "Sebbie" Silbermann Committed by GitHub

[lts-active] test: remove unsupported deployment ID builder cases (#98821)

Backports https://github.com/vercel/next.js/pull/98668

...to fix deployment tests.

Test does not exist on lts-maintenance so this is the only necessary
backport.
Co-authored-by: 's avatarTobias Koppers <tobias.koppers@googlemail.com>
Co-authored-by: 's avatarvercel-fleet-prod[bot] <318278635+vercel-fleet-prod[bot]@users.noreply.github.com>
Co-authored-by: 's avatarTobias Koppers <1365881+sokra@users.noreply.github.com>
parent ca2c75eb
......@@ -222,11 +222,9 @@ async function runTest(
})
describe.each([
{ test: 'standard', mode: 'builder' } as const,
{ test: 'standard', mode: 'adapter' } as const,
{ test: 'cacheComponents', mode: 'builder' } as const,
{ test: 'cacheComponents', mode: 'adapter' } as const,
])('build output API - $test $mode', ({ test, mode }) => {
{ test: 'standard' } as const,
{ test: 'cacheComponents' } as const,
])('build output API - $test adapter', ({ test }) => {
const { next } = nextTestSetup({
files: {
// A mock file to be able to run `vercel build` without logging in
......@@ -243,43 +241,33 @@ async function runTest(
// We use NEXT_TEST_PREFER_OFFLINE, so just declaring `vercel: latest` as a dependency still
// doesn't force the latest version.
buildCommand: 'pnpm dlx vercel@latest build',
env:
mode === 'adapter'
? {
NEXT_ENABLE_ADAPTER: '1',
}
: undefined,
env: {
NEXT_ENABLE_ADAPTER: '1',
},
skipStart: true,
disableAutoSkewProtection: true,
})
it(
'should produce identical build outputs even when changing deployment id',
async () => {
let { run1, run2 } = await runTest(next, readFilesBuilder)
it('should produce identical build outputs even when changing deployment id', async () => {
let { run1, run2 } = await runTest(next, readFilesBuilder)
expect(run1.size).toBeGreaterThan(0)
expect([...run1.keys()]).toEqual([...run2.keys()])
expect(run1.size).toBeGreaterThan(0)
expect([...run1.keys()]).toEqual([...run2.keys()])
if (test === 'standard') {
expect([...run1.keys()]).toIncludeAllMembers([
'.vercel/output/functions/app-page.func/.vc-config.json',
'.vercel/output/functions/app-page.rsc.func/.vc-config.json',
'.vercel/output/functions/app-route.func/.vc-config.json',
'.vercel/output/functions/app-route.rsc.func/.vc-config.json',
'.vercel/output/functions/pages-dynamic.func/.vc-config.json',
'.vercel/output/functions/pages-static-gsp.func/.vc-config.json',
])
expect([...run1.keys()]).toSatisfyAny((k) =>
k.includes('middleware.func')
)
}
},
// The builder mode can take a bit longer, so we increase the timeout
// for these tests. The adapter mode should be faster, so we leave it as
// the default.
mode === 'builder' ? 120_000 : undefined
)
if (test === 'standard') {
expect([...run1.keys()]).toIncludeAllMembers([
'.vercel/output/functions/app-page.func/.vc-config.json',
'.vercel/output/functions/app-page.rsc.func/.vc-config.json',
'.vercel/output/functions/app-route.func/.vc-config.json',
'.vercel/output/functions/app-route.rsc.func/.vc-config.json',
'.vercel/output/functions/pages-dynamic.func/.vc-config.json',
'.vercel/output/functions/pages-static-gsp.func/.vc-config.json',
])
expect([...run1.keys()]).toSatisfyAny((k) =>
k.includes('middleware.func')
)
}
})
})
}
)
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