test: remove unused comparator coverage and orphan fixtures

This commit is contained in:
OrcaWin
2026-11-12 11:28:37 -08:00
parent 908ab68ca0
commit 3e02c4bbb1
5 changed files with 0 additions and 105 deletions
@@ -27,24 +27,6 @@ describe('skill install service', () => {
expect(await readFile(join(claude, 'SKILL.md'), 'utf8')).toBe('unowned')
})
it('removes an owned placement when its provider is deselected', async () => {
const { root, input } = await createSkillInstallHome()
await installSharedSkill(input)
const claude = join(root, 'home', '.claude', 'skills', 'test-skill')
const updated = await installSharedSkill({
...input,
operationId: 'operation_without_claude',
detectedProviders: ['codex']
})
expect(updated.status).toBe('unchanged')
await expect(lstat(claude)).rejects.toMatchObject({ code: 'ENOENT' })
expect(updated.placements).toEqual([
expect.objectContaining({ provider: 'agent-skills', topology: 'canonical-copy' })
])
})
it('preserves the committed canonical install when cancellation reaches provider placement', async () => {
const { root, input } = await createSkillInstallHome()
const controller = new AbortController()
@@ -1,13 +0,0 @@
import { createCheckLogFixture } from '../../../../../../../config/scripts/performance/check-job-log/check-job-log-test-fixture.mjs'
import { sliceCheckLogTail } from '../../../../../../shared/source-control/checks/logs/check-job-log-tail-slice'
export const capturedCheckLogFailure = createCheckLogFixture()
export const capturedCheckLogExcerpt = sliceCheckLogTail(capturedCheckLogFailure.rawLog)
export const capturedCheckLogFrame = capturedCheckLogExcerpt
.split('\n')
.find((line) => line.includes(capturedCheckLogFailure.expectedStackFrame))
if (!capturedCheckLogFrame) {
throw new Error('Captured check log is missing its expected complete frame')
}
@@ -1,10 +0,0 @@
// Use a proxy because tab activation reaches sidebar icons beyond each test’s direct imports.
export function stubEveryIcon(): Record<string, unknown> {
const Icon = (): null => null
const isIconKey = (key: string | symbol): boolean => typeof key === 'string' && key !== 'then'
return new Proxy({} as Record<string, unknown>, {
get: (_target, key) => (isIconKey(key) ? Icon : undefined),
has: (_target, key) => isIconKey(key)
})
}
@@ -1,16 +0,0 @@
import type { XtermBypassEvent } from './xterm-bypass-policy'
// Keep bypass/IME suites aligned with the complete XtermBypassEvent shape.
export function event(overrides: Partial<XtermBypassEvent>): XtermBypassEvent {
return {
type: 'keydown',
key: '',
code: '',
defaultPrevented: false,
metaKey: false,
ctrlKey: false,
altKey: false,
shiftKey: false,
...overrides
}
}
@@ -1,48 +0,0 @@
import {
closeSync,
mkdtempSync,
openSync,
rmSync,
truncateSync,
writeFileSync,
writeSync
} from 'node:fs'
import { tmpdir } from 'node:os'
import { join } from 'node:path'
import { afterEach, describe, expect, it } from 'vitest'
import {
NODE_FILE_CONTENT_COMPARE_CHUNK_BYTES,
nodeSourceAndCopyContentsEqualSync
} from './node-source-copy-content-equality'
describe('Node source/copy content equality', () => {
const roots: string[] = []
afterEach(() => {
for (const root of roots.splice(0)) {
rmSync(root, { recursive: true, force: true })
}
})
it('compares multi-megabyte sparse files with fixed-size chunks', () => {
const root = mkdtempSync(join(tmpdir(), 'orca-resource-compare-'))
roots.push(root)
const sourcePath = join(root, 'source.md')
const copyPath = join(root, 'copy.md')
const sparseBytes = NODE_FILE_CONTENT_COMPARE_CHUNK_BYTES * 128
for (const path of [sourcePath, copyPath]) {
writeFileSync(path, 'same-prefix')
truncateSync(path, sparseBytes)
}
expect(nodeSourceAndCopyContentsEqualSync(sourcePath, copyPath)).toBe(true)
const descriptor = openSync(copyPath, 'r+')
try {
writeSync(descriptor, Buffer.from('x'), 0, 1, sparseBytes - 1)
} finally {
closeSync(descriptor)
}
expect(nodeSourceAndCopyContentsEqualSync(sourcePath, copyPath)).toBe(false)
})
})