Skip to content

armgit / orca

Public Imported from GitHub
0

Orca is the place for working with a fleet of agents (e.g. Grok Bot, Claude Code). Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

812 B
Raw Blame
import { describe, expect, it } from 'vitest'
import { isTerminalPhoneDisplayMode } from './mobile-session-route-helpers'

describe('isTerminalPhoneDisplayMode', () => {
  it('uses phone mode for automatic, phone, and unreported terminals', () => {
    const modes = new Map([
      ['auto', 'auto'],
      ['phone', 'phone']
    ] as const)

    expect(isTerminalPhoneDisplayMode('auto', modes)).toBe(true)
    expect(isTerminalPhoneDisplayMode('phone', modes)).toBe(true)
    expect(isTerminalPhoneDisplayMode('missing', modes)).toBe(true)
  })

  it('rejects absent handles and desktop terminals', () => {
    const modes = new Map([['desktop', 'desktop']] as const)

    expect(isTerminalPhoneDisplayMode(null, modes)).toBe(false)
    expect(isTerminalPhoneDisplayMode('desktop', modes)).toBe(false)
  })
})