Files
orca/src/shared/qoder-cn-launch-recipe.spec.ts
T
Neil 7a47f465a3 ci: trim redundant tests and consolidate suite startup (#29156)
* ci: trim redundant tests and consolidate suite startup

* ci: repair consolidated suite names and gate references
2026-10-15 07:11:58 -07:00

50 lines
1.6 KiB
TypeScript

import { describe, expect, it } from 'vitest'
import { buildAgentStartupPlan, buildAgentResumeStartupPlan } from './tui-agent-startup'
describe('Qoder China launch recipe identity', () => {
it.each(['darwin', 'linux', 'win32'] as const)(
'preserves the official China executable on %s',
(platform) => {
const plan = buildAgentStartupPlan({
agent: 'qoder-cn',
prompt: 'fixture',
cmdOverrides: {},
platform
})
expect(plan?.agent).toBe('qoder-cn')
expect(plan?.launchCommand).toBe("qoderclicn --prompt-interactive 'fixture'")
expect(
buildAgentResumeStartupPlan({
agent: 'qoder-cn',
providerSession: { key: 'session_id', id: 'fixture-session' },
cmdOverrides: {},
platform
})?.launchCommand
).toBe("qoderclicn '--resume' 'fixture-session'")
}
)
it.each(['darwin', 'linux', 'win32'] as const)(
'preserves an explicitly configured shared-binary --cn recipe on %s',
(platform) => {
const cmdOverrides = { 'qoder-cn': 'qodercli --cn' }
const plan = buildAgentStartupPlan({
agent: 'qoder-cn',
prompt: 'fixture',
cmdOverrides,
platform
})
expect(plan?.agent).toBe('qoder-cn')
expect(plan?.launchCommand).toBe("qodercli --cn --prompt-interactive 'fixture'")
expect(
buildAgentResumeStartupPlan({
agent: 'qoder-cn',
providerSession: { key: 'session_id', id: 'fixture-session' },
cmdOverrides,
platform
})?.launchCommand
).toBe("qodercli --cn '--resume' 'fixture-session'")
}
)
})