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.

730 B
Raw Blame
import { describe, expect, it } from 'vitest'

import {
  GITHUB_PROJECT_REF_INPUT_MAX_BYTES,
  hasBoundedGitHubProjectRefInputText,
  isGitHubProjectRefInputTooLarge
} from './project-ref-input'

describe('GitHub project reference input limits', () => {
  it('rejects oversized whitespace before submit checks trim the reference', () => {
    const oversizedWhitespace = ' '.repeat(GITHUB_PROJECT_REF_INPUT_MAX_BYTES + 1)

    expect(isGitHubProjectRefInputTooLarge(oversizedWhitespace)).toBe(true)
    expect(hasBoundedGitHubProjectRefInputText(oversizedWhitespace)).toBe(false)
    expect(hasBoundedGitHubProjectRefInputText('  acme/42  ')).toBe(true)
    expect(hasBoundedGitHubProjectRefInputText('   ')).toBe(false)
  })
})