Skip to content

Commit 8f4c407

Browse files
committed
fix(e2e): prompt for sea and smol binaries separately
- Always register smol and sea test suites (not just when env vars set) - Each binary gets its own prompt: "Build {name}?" - Only show time warning for smol: "(may take 30-60 min)" - Separate prompts allow users to build only what they need
1 parent 8bd1663 commit 8f4c407

1 file changed

Lines changed: 7 additions & 10 deletions

File tree

packages/cli/test/e2e/binary-test-suite.e2e.test.mts

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,10 @@ function runBinaryTestSuite(binaryType: keyof typeof BINARIES) {
111111
}
112112

113113
// Locally: Prompt user to build.
114+
const timeWarning = binaryType === 'smol' ? ' (may take 30-60 min)' : ''
114115
const shouldBuild = await confirm({
115116
default: true,
116-
message: `Build ${binary.name}? (may take 30-60 min for smol)`,
117+
message: `Build ${binary.name}?${timeWarning}`,
117118
})
118119

119120
if (!shouldBuild) {
@@ -278,16 +279,12 @@ function runBinaryTestSuite(binaryType: keyof typeof BINARIES) {
278279

279280
// Run test suite for each binary type.
280281
describe('Socket CLI Binary Test Suite', () => {
281-
// Always register the JS binary test suite.
282+
// Always run JS binary test suite.
282283
runBinaryTestSuite('js')
283284

284-
// Only register smol test suite if environment variable is set.
285-
if (process.env.TEST_SMOL_BINARY) {
286-
runBinaryTestSuite('smol')
287-
}
285+
// Run smol test suite (will prompt locally, skip in CI if not cached).
286+
runBinaryTestSuite('smol')
288287

289-
// Only register SEA test suite if environment variable is set.
290-
if (process.env.TEST_SEA_BINARY) {
291-
runBinaryTestSuite('sea')
292-
}
288+
// Run SEA test suite (will prompt locally, skip in CI if not cached).
289+
runBinaryTestSuite('sea')
293290
})

0 commit comments

Comments
 (0)