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.

649 B
Raw Blame
import { describe, expect, it } from 'vitest'
import { readTerminalCellBox } from './terminal-cell-box'

const CELL_1X = { fontScale: 1, cellWidth: 23 / 3, cellHeight: 15 }

describe('readTerminalCellBox', () => {
  it('reads nothing from a notify without a cell box', () => {
    expect(readTerminalCellBox({ type: 'web-ready' })).toBeNull()
  })

  it('reads a well-formed box and rejects a malformed one', () => {
    expect(readTerminalCellBox({ cellBox: CELL_1X })).toEqual(CELL_1X)
    expect(readTerminalCellBox({ cellBox: { ...CELL_1X, cellWidth: 0 } })).toBeNull()
    expect(readTerminalCellBox({ cellBox: [CELL_1X] })).toBeNull()
  })
})