mirror of
https://github.com/stablyai/orca.git
synced 2026-10-25 08:04:05 +00:00
26 lines
637 B
TypeScript
26 lines
637 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import { WorktreeCreate } from './worktree-schemas'
|
|
|
|
describe('worktree RPC schemas', () => {
|
|
it('rejects invalid startup agent values', () => {
|
|
const parsed = WorktreeCreate.safeParse({
|
|
repo: 'repo-1',
|
|
name: 'agent-startup',
|
|
startupAgent: 'wat',
|
|
startupPrompt: 'hi'
|
|
})
|
|
|
|
expect(parsed.success).toBe(false)
|
|
})
|
|
|
|
it('rejects startup prompts without startup agents', () => {
|
|
const parsed = WorktreeCreate.safeParse({
|
|
repo: 'repo-1',
|
|
name: 'agent-startup',
|
|
startupPrompt: 'hi'
|
|
})
|
|
|
|
expect(parsed.success).toBe(false)
|
|
})
|
|
})
|