mirror of
https://github.com/stablyai/orca.git
synced 2026-09-22 08:02:28 +00:00
26 lines
882 B
TypeScript
26 lines
882 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import { resolveRuntimeNavigationTarget } from './runtime-navigation'
|
|
|
|
describe('runtime navigation authority', () => {
|
|
it('denies paired-client fanout for legacy payloads', () => {
|
|
expect(resolveRuntimeNavigationTarget({ clientKind: 'runtime', notifyClients: true })).toBe(
|
|
'caller'
|
|
)
|
|
expect(resolveRuntimeNavigationTarget({ clientKind: 'mobile', notifyClients: true })).toBe(
|
|
'caller'
|
|
)
|
|
})
|
|
|
|
it('preserves legacy in-process routing and explicit intent', () => {
|
|
expect(resolveRuntimeNavigationTarget({ notifyClients: true })).toBe('all')
|
|
expect(resolveRuntimeNavigationTarget({ notifyClients: false })).toBe('caller')
|
|
expect(
|
|
resolveRuntimeNavigationTarget({
|
|
clientKind: 'runtime',
|
|
notifyClients: false,
|
|
navigation: 'host'
|
|
})
|
|
).toBe('host')
|
|
})
|
|
})
|