Files
orca/tests/e2e/terminal-probe-input-sequence.unit.test.ts
T
Jinjing 44e4d8d4f5 Fix Windows ConPTY probe failures by removing startup control bytes (#5893)
* Fix Windows ConPTY probe failures by removing startup control bytes

Avoid prepending terminal probes with interrupt (`\x03`) or line-kill
(`\x15`) control characters on fresh shell launches. In Windows ConPTY,
echoing a startup Ctrl+C can print a literal "^C" and corrupt the subsequent
PowerShell commands.

- Extract probe command sequence generation to a dedicated helper
- Include E2E unit tests in the Vitest test suite config

* Rename terminal probe E2E test to match unit test pattern

Update the Vitest configuration glob pattern to target only E2E tests
ending in `.unit.test.ts`, and rename the terminal probe input sequence
test to match. This ensures only unit-like E2E tests are picked up
by Vitest.
2026-06-20 02:03:24 -07:00

13 lines
594 B
TypeScript

import { describe, expect, it } from 'vitest'
import { buildFreshShellProbeInputSequence } from './terminal-probe-input-sequence'
describe('buildFreshShellProbeInputSequence', () => {
it('does not prefix fresh shell probes with interrupt or line-kill bytes', () => {
const command = "& 'C:\\node\\node.exe' '-e' 'console.log(1)'\r"
expect(buildFreshShellProbeInputSequence(command)).toEqual([command])
expect(buildFreshShellProbeInputSequence(command).join('')).not.toContain('\x03')
expect(buildFreshShellProbeInputSequence(command).join('')).not.toContain('\x15')
})
})