test: remove low-value renderer main shared and script suites (#42548)

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
This commit is contained in:
OrcaWin
2026-11-14 16:35:55 -08:00
committed by GitHub
co-authored by OrcaWin
parent 552c71ef10
commit 9ef747cfc1
46 changed files with 0 additions and 1689 deletions
@@ -1,30 +0,0 @@
import { describe, expect, it } from 'vitest'
import { isMissingGitBlobPath } from './git-blob-absence'
describe('Git blob path absence', () => {
it.each([
'fatal: bad object :new.txt',
'fatal: invalid object name HEAD',
'fatal: detected dubious ownership in repository',
'fatal: bad config line 1',
"fatal: path 'other.txt' does not exist (neither on disk nor in the index)",
"fatal: path 'new.txt' is in the index, but not at stage 0"
])('does not classify another failure as absence (%s)', (stderr) => {
expect(isMissingGitBlobPath({ code: 128, stderr }, 'new.txt')).toBe(false)
})
it('requires the exit status as well as the diagnostic', () => {
const stderr = "fatal: path 'new.txt' exists on disk, but not in the index"
expect(isMissingGitBlobPath({ code: 1, stderr }, 'new.txt')).toBe(false)
expect(isMissingGitBlobPath({ code: '128', stderr }, 'new.txt')).toBe(false)
})
it('matches newline and quote filenames literally', () => {
const filePath = "quote' and\nnewline.txt"
const stderr = `fatal: path '${filePath}' exists on disk, but not in the index\n`
expect(isMissingGitBlobPath({ code: 128, stderr }, filePath)).toBe(true)
expect(
isMissingGitBlobPath({ code: 128, stderr: `fatal: bad object :${filePath}` }, filePath)
).toBe(false)
})
})