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.

487 B
Raw Blame
import { describe, expect, it } from 'vitest'
import { encodeServeSimTouchFrame } from './emulator-touch-frame'

describe('encodeServeSimTouchFrame', () => {
  it('encodes serve-sim touch messages with the binary touch tag', () => {
    const frame = encodeServeSimTouchFrame({ type: 'move', x: 0.25, y: 0.75 })

    expect(frame[0]).toBe(0x03)
    expect(JSON.parse(new TextDecoder().decode(frame.subarray(1)))).toEqual({
      type: 'move',
      x: 0.25,
      y: 0.75
    })
  })
})