test: tighten core helper object assertions

This commit is contained in:
Peter Steinberger
2026-05-09 03:04:29 +01:00
parent af5eca9371
commit 25bfe29024
3 changed files with 2 additions and 6 deletions

View File

@@ -38,10 +38,6 @@ import { createClaudeApiErrorFixture } from "./test-helpers/claude-api-error-fix
type ProcessSupervisor = ReturnType<typeof getProcessSupervisor>;
type SupervisorSpawnFn = ProcessSupervisor["spawn"];
async function expectPathMissing(targetPath: string): Promise<void> {
await expect(fs.access(targetPath)).rejects.toMatchObject({ code: "ENOENT" });
}
beforeEach(() => {
resetAgentEventsForTest();
resetClaudeLiveSessionsForTest();

View File

@@ -7,7 +7,7 @@ import {
} from "./inline-eval.js";
function expectInlineEvalDescription(hit: InterpreterInlineEvalHit | null, expected: string) {
expect(hit).toEqual(expect.any(Object));
expect(hit).not.toBeNull();
if (hit === null) {
throw new Error(`Expected inline eval hit for ${expected}`);
}

View File

@@ -12,7 +12,7 @@ import {
function parseSpecOrThrow(spec: string) {
const parsed = parseRegistryNpmSpec(spec);
expect(parsed).toEqual(expect.any(Object));
expect(parsed).not.toBeNull();
if (parsed === null) {
throw new Error(`Expected ${spec} to parse`);
}