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.

774 B
Raw Blame
import { describe, expect, it } from 'vitest'
import { claudeBashInputAsTypedCommand } from './claude-bash-input'

describe('claudeBashInputAsTypedCommand', () => {
  it('restores the line as typed, keeping the space after `!`', () => {
    expect(claudeBashInputAsTypedCommand('<bash-input> gcloud auth login</bash-input>')).toBe(
      '! gcloud auth login'
    )
    expect(claudeBashInputAsTypedCommand('<bash-input>ls -la</bash-input>')).toBe('!ls -la')
  })
  it.each([
    'run <bash-input>ls</bash-input>',
    '<bash-input>ls</bash-input> and more',
    '<bash-stdout>ok</bash-stdout>',
    '<bash-input>a</bash-input><bash-input>b</bash-input>'
  ])('leaves anything else alone (%s)', (text) => {
    expect(claudeBashInputAsTypedCommand(text)).toBeNull()
  })
})