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(' gcloud auth login')).toBe( '! gcloud auth login' ) expect(claudeBashInputAsTypedCommand('ls -la')).toBe('!ls -la') }) it.each([ 'run ls', 'ls and more', 'ok', 'ab' ])('leaves anything else alone (%s)', (text) => { expect(claudeBashInputAsTypedCommand(text)).toBeNull() }) })