Skip to content

Commit d0e8fa7

Browse files
claude: Fix PDF text position test error message format
Include error details in the assertion message instead of printing separately to console.error. This follows the pattern used by ensurePdfMetadata and allows assertThrowsWithPattern to match specific error patterns. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent d59c991 commit d0e8fa7

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

‎tests/verify-pdf-text-position.ts‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,14 +1035,9 @@ export const ensurePdfTextPositions = (
10351035

10361036
// Stage 9: Aggregate errors
10371037
if (errors.length > 0) {
1038-
// Print detailed errors to stderr (stdout is captured by test framework)
1039-
console.error(`\nPDF position assertions failed in ${file}:`);
1040-
errors.forEach((e, i) => console.error(` ${i + 1}. ${e}`));
1041-
console.error("");
1042-
10431038
assert(
10441039
false,
1045-
`PDF position assertions failed in ${file}: ${errors.length} error(s)`,
1040+
`PDF position assertions failed in ${file}:\n${errors.map((e, i) => ` ${i + 1}. ${e}`).join("\n")}`,
10461041
);
10471042
}
10481043
},

0 commit comments

Comments
 (0)