test: consolidate failure guards and trim unused fixture APIs

This commit is contained in:
morluto
2026-10-09 03:13:43 +08:00
parent 81ae838567
commit ffd9611308
38 changed files with 90 additions and 203 deletions
@@ -40,8 +40,7 @@ it.each([
await writeFile(leftPath, left);
await writeFile(rightPath, right);
const result = await compareManagedMemberPaths({ leftPath, rightPath });
expect(result.ok).toBe(true);
if (!result.ok) return;
if (!result.ok) throw result.error;
const comparison = managedMemberComparisonResultSchema.parse(
result.value.normalized_result,
);
@@ -83,8 +82,7 @@ describe("managed member comparison path workflow", () => {
right: observe(0xfe, "/tmp/partial-right.dll"),
});
const result = compareManagedMembersEvidenceValidated(input);
expect(result.ok).toBe(true);
if (!result.ok) return;
if (!result.ok) throw result.error;
const comparison = managedMemberComparisonResultSchema.parse(
result.value.normalized_result,
);
@@ -114,8 +112,7 @@ describe("managed member comparison path workflow", () => {
rightPath,
});
expect(result.ok).toBe(true);
if (!result.ok) return;
if (!result.ok) throw result.error;
expect(result.value).toMatchObject({
operation: "compare_managed_members",
confidence: "inferred",