Skip to content

Commit 413940c

Browse files
committed
Tighten CLI typing assertion and extend e2e timeout
1 parent f863794 commit 413940c

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

cli/src/__tests__/e2e/cli-ui.test.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -295,15 +295,10 @@ describe('CLI UI Tests', () => {
295295
const text = await session.text()
296296
// The typed text should appear in the terminal
297297
const lower = text.toLowerCase()
298-
const hasInput =
299-
lower.includes('hello world') ||
300-
lower.includes('hello') ||
301-
lower.includes('world') ||
302-
lower.includes('hlloworld')
303-
if (!hasInput) {
298+
if (!lower.includes('hello world')) {
304299
logSnapshot('Typed text output', text)
305300
}
306-
expect(hasInput).toBe(true)
301+
expect(lower).toContain('hello world')
307302
} finally {
308303
await session.press(['ctrl', 'c'])
309304
session.close()

cli/src/__tests__/e2e/full-stack.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Run with: bun test e2e/full-stack.test.ts
1313
*/
1414

15-
import { describe, test, expect, beforeAll, afterAll } from 'bun:test'
15+
import { describe, test, expect, beforeAll, afterAll, setTestTimeout } from 'bun:test'
1616

1717
import { isSDKBuilt } from '../test-utils'
1818
import { createE2ETestContext, sleep } from './test-cli-utils'
@@ -23,6 +23,9 @@ import type { E2ETestContext } from './test-cli-utils'
2323
const TIMEOUT_MS = 180000 // 3 minutes for e2e tests
2424
const sdkBuilt = isSDKBuilt()
2525

26+
// Allow long-running hooks and tests for full E2E flows
27+
setTestTimeout(TIMEOUT_MS)
28+
2629
function logSnapshot(label: string, text: string): void {
2730
console.log(`\n[E2E DEBUG] ${label}\n${'-'.repeat(40)}\n${text}\n${'-'.repeat(40)}\n`)
2831
}

0 commit comments

Comments
 (0)