mirror of
https://github.com/stablyai/orca.git
synced 2026-10-02 08:02:02 +00:00
* Fix start-from PR failures for some fork PRs * fix: limit PR fallback fetches to missing refs --------- Co-authored-by: Neil <4138956+nwparker@users.noreply.github.com>
25 lines
811 B
TypeScript
25 lines
811 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import { isMissingRemoteRefGitError } from './fetch-error-classification'
|
|
|
|
describe('isMissingRemoteRefGitError', () => {
|
|
it('matches missing remote ref messages', () => {
|
|
expect(
|
|
isMissingRemoteRefGitError(
|
|
new Error('fatal: could not find remote ref refs/heads/feature/test')
|
|
)
|
|
).toBe(true)
|
|
expect(
|
|
isMissingRemoteRefGitError(
|
|
new Error("fatal: couldn't find remote ref refs/heads/feature/test")
|
|
)
|
|
).toBe(true)
|
|
})
|
|
|
|
it('does not match auth or network failures', () => {
|
|
expect(isMissingRemoteRefGitError(new Error('fatal: Authentication failed'))).toBe(false)
|
|
expect(
|
|
isMissingRemoteRefGitError(new Error('fatal: unable to access repo: Could not resolve host'))
|
|
).toBe(false)
|
|
})
|
|
})
|