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.

696 B
Raw Blame
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import {
  createMobileRelayPairingFixtures,
  encodePairingFixturePayload
} from '../../../src/shared/mobile-relay-pairing-fixtures'
import { decodePairingUrl } from './pairing'

describe('mobile relay pairing contract', () => {
  const now = Date.UTC(2026, 6, 12, 16)

  beforeEach(() => {
    vi.useFakeTimers()
    vi.setSystemTime(now)
  })

  afterEach(() => {
    vi.useRealTimers()
  })

  for (const fixture of createMobileRelayPairingFixtures(now)) {
    it(fixture.name, () => {
      expect(decodePairingUrl(encodePairingFixturePayload(fixture.payload))).toEqual(
        fixture.expected
      )
    })
  }
})