Skip to content

Commit 1230176

Browse files
committed
test: don't prepare e2e-only fixtures ahead of time
1 parent e68d575 commit 1230176

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/prepare.mjs

+17
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,29 @@ const NEXT_VERSION = process.env.NEXT_VERSION ?? 'latest'
1818
const fixturesDir = fileURLToPath(new URL(`./fixtures`, import.meta.url))
1919
const fixtureFilter = argv[2] ?? ''
2020

21+
// E2E tests run next builds, so we don't need to prepare those ahead of time for integration tests
22+
const e2eOnlyFixtures = new Set([
23+
'after',
24+
'cli-before-regional-blobs-support',
25+
'dist-dir',
26+
// There is also a bug on Windows on Node.js 18.20.6, that cause build failures on this fixture
27+
// see https://github.com/opennextjs/opennextjs-netlify/actions/runs/13268839161/job/37043172448?pr=2749#step:12:78
28+
'middleware-og',
29+
'middleware-single-matcher',
30+
'nx-integrated',
31+
'turborepo',
32+
'unstable-cache',
33+
])
34+
2135
const limit = pLimit(Math.max(2, cpus().length / 2))
2236
const fixtures = readdirSync(fixturesDir)
2337
// Ignoring things like `.DS_Store`.
2438
.filter((fixture) => !fixture.startsWith('.'))
2539
// Applying the filter, if one is set.
2640
.filter((fixture) => !fixtureFilter || fixture.startsWith(fixtureFilter))
41+
// Filter out fixtures that are only needed for E2E tests
42+
.filter((fixture) => !e2eOnlyFixtures.has(fixture))
43+
2744
console.log(`🧪 Preparing fixtures: ${fixtures.join(', ')}`)
2845
const fixtureList = new Set(fixtures)
2946
const fixtureCount = fixtures.length

0 commit comments

Comments
 (0)