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.

727 B
Raw Blame
import { describe, expect, it } from 'vitest'
import { selectPullRequestDiffBase } from './git-pull-request-diff-base.mjs'

describe('pull request diff base selection', () => {
  it('uses the merge commit first parent for pull request checkouts', () => {
    expect(
      selectPullRequestDiffBase('event-base', ['current-base', 'pull-request-head'], 'pull_request')
    ).toBe('current-base')
  })

  it('keeps the requested base outside synthetic pull request merges', () => {
    expect(selectPullRequestDiffBase('requested-base', ['parent'], 'pull_request')).toBe(
      'requested-base'
    )
    expect(selectPullRequestDiffBase('requested-base', ['parent', 'other'], 'push')).toBe(
      'requested-base'
    )
  })
})