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.

582 B
Raw Blame
import { describe, expect, it } from 'vitest'
import { discordPromptText, escapeDiscordText } from './discord-text.js'

describe('discordPromptText', () => {
  it('drops the bot mention in either form and keeps other mentions', () => {
    expect(discordPromptText('<@12> fix <@!12> it <@34>', '12')).toBe('fix  it <@34>')
  })
})

describe('escapeDiscordText', () => {
  it('escapes markdown and mention openers', () => {
    expect(escapeDiscordText('my_box *[x](y)* <@1> # `a` ~|>\\')).toBe(
      'my\\_box \\*\\[x\\]\\(y\\)\\* \\<@1\\> \\# \\`a\\` \\~\\|\\>\\\\'
    )
  })
})