Skip to content

Commit 8c81cbb

Browse files
eps1lonsokravercel-fleet-prod[bot]
authored
[lts-active] test: remove unsupported deployment ID builder cases (#98821)
Backports #98668 ...to fix deployment tests. Test does not exist on lts-maintenance so this is the only necessary backport. Co-authored-by: Tobias Koppers <[email protected]> Co-authored-by: vercel-fleet-prod[bot] <318278635+vercel-fleet-prod[bot]@users.noreply.github.com> Co-authored-by: Tobias Koppers <[email protected]>
1 parent ca2c75e commit 8c81cbb

1 file changed

Lines changed: 24 additions & 36 deletions

File tree

‎test/production/deterministic-build/deployment-id.test.ts‎

Lines changed: 24 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -222,11 +222,9 @@ async function runTest(
222222
})
223223

224224
describe.each([
225-
{ test: 'standard', mode: 'builder' } as const,
226-
{ test: 'standard', mode: 'adapter' } as const,
227-
{ test: 'cacheComponents', mode: 'builder' } as const,
228-
{ test: 'cacheComponents', mode: 'adapter' } as const,
229-
])('build output API - $test $mode', ({ test, mode }) => {
225+
{ test: 'standard' } as const,
226+
{ test: 'cacheComponents' } as const,
227+
])('build output API - $test adapter', ({ test }) => {
230228
const { next } = nextTestSetup({
231229
files: {
232230
// A mock file to be able to run `vercel build` without logging in
@@ -243,43 +241,33 @@ async function runTest(
243241
// We use NEXT_TEST_PREFER_OFFLINE, so just declaring `vercel: latest` as a dependency still
244242
// doesn't force the latest version.
245243
buildCommand: 'pnpm dlx vercel@latest build',
246-
env:
247-
mode === 'adapter'
248-
? {
249-
NEXT_ENABLE_ADAPTER: '1',
250-
}
251-
: undefined,
244+
env: {
245+
NEXT_ENABLE_ADAPTER: '1',
246+
},
252247
skipStart: true,
253248
disableAutoSkewProtection: true,
254249
})
255250

256-
it(
257-
'should produce identical build outputs even when changing deployment id',
258-
async () => {
259-
let { run1, run2 } = await runTest(next, readFilesBuilder)
251+
it('should produce identical build outputs even when changing deployment id', async () => {
252+
let { run1, run2 } = await runTest(next, readFilesBuilder)
260253

261-
expect(run1.size).toBeGreaterThan(0)
262-
expect([...run1.keys()]).toEqual([...run2.keys()])
254+
expect(run1.size).toBeGreaterThan(0)
255+
expect([...run1.keys()]).toEqual([...run2.keys()])
263256

264-
if (test === 'standard') {
265-
expect([...run1.keys()]).toIncludeAllMembers([
266-
'.vercel/output/functions/app-page.func/.vc-config.json',
267-
'.vercel/output/functions/app-page.rsc.func/.vc-config.json',
268-
'.vercel/output/functions/app-route.func/.vc-config.json',
269-
'.vercel/output/functions/app-route.rsc.func/.vc-config.json',
270-
'.vercel/output/functions/pages-dynamic.func/.vc-config.json',
271-
'.vercel/output/functions/pages-static-gsp.func/.vc-config.json',
272-
])
273-
expect([...run1.keys()]).toSatisfyAny((k) =>
274-
k.includes('middleware.func')
275-
)
276-
}
277-
},
278-
// The builder mode can take a bit longer, so we increase the timeout
279-
// for these tests. The adapter mode should be faster, so we leave it as
280-
// the default.
281-
mode === 'builder' ? 120_000 : undefined
282-
)
257+
if (test === 'standard') {
258+
expect([...run1.keys()]).toIncludeAllMembers([
259+
'.vercel/output/functions/app-page.func/.vc-config.json',
260+
'.vercel/output/functions/app-page.rsc.func/.vc-config.json',
261+
'.vercel/output/functions/app-route.func/.vc-config.json',
262+
'.vercel/output/functions/app-route.rsc.func/.vc-config.json',
263+
'.vercel/output/functions/pages-dynamic.func/.vc-config.json',
264+
'.vercel/output/functions/pages-static-gsp.func/.vc-config.json',
265+
])
266+
expect([...run1.keys()]).toSatisfyAny((k) =>
267+
k.includes('middleware.func')
268+
)
269+
}
270+
})
283271
})
284272
}
285273
)

0 commit comments

Comments
 (0)