Files
orca/config/vitest.config.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

33 lines
948 B
TypeScript

import { resolve } from 'path'
import { defineConfig } from 'vitest/config'
const windowsTestWorkerOptions = process.platform === 'win32' ? { maxWorkers: 4 } : {}
export default defineConfig({
define: {
ORCA_FEATURE_WALL_ENABLED: 'true'
},
resolve: {
alias: {
'@renderer': resolve('src/renderer/src'),
'@': resolve('src/renderer/src')
}
},
test: {
environment: 'node',
include: [
'src/**/*.test.ts',
'src/**/*.test.tsx',
'config/scripts/**/*.test.mjs',
'tests/e2e/**/*.unit.test.ts'
],
// Why: the full suite runs heavy TS transforms plus real git/http fixtures;
// the Vitest 5s defaults are too tight for the slowest integration cases.
hookTimeout: 60_000,
testTimeout: 30_000,
// Why: Windows process and shell startup are slower under full-suite load;
// macOS/Linux keep Vitest's default worker parallelism.
...windowsTestWorkerOptions
}
})