mirror of
https://github.com/stablyai/orca.git
synced 2026-10-31 00:57:45 +00:00
* Reduce repeated imports in SourceControl and socket tests * Retire test-only scans and skip unrelated server test matrices
20 lines
828 B
TypeScript
20 lines
828 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import { resolveHookCommandSourcePolicy } from './hook-command-source-policy'
|
|
|
|
describe('hook command source policy', () => {
|
|
it('uses local commands by default when a local script is configured', () => {
|
|
expect(resolveHookCommandSourcePolicy(undefined, { hasLocalScript: true })).toBe('local-only')
|
|
})
|
|
|
|
it('uses shared commands by default when no local script is configured', () => {
|
|
expect(resolveHookCommandSourcePolicy(undefined, { hasLocalScript: false })).toBe('shared-only')
|
|
})
|
|
|
|
it('preserves explicit command source choices', () => {
|
|
expect(resolveHookCommandSourcePolicy('shared-only', { hasLocalScript: true })).toBe(
|
|
'shared-only'
|
|
)
|
|
expect(resolveHookCommandSourcePolicy('run-both', { hasLocalScript: true })).toBe('run-both')
|
|
})
|
|
})
|