Skip to content

Commit 928f1f4

Browse files
matejclaude
andcommitted
Fix test to match unified review output format
Update test to use current finding format (category field directly instead of metadata.vulnerability_type) and expected output. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 6da9d5a commit 928f1f4

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

scripts/comment-pr-findings.bun.test.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -435,13 +435,9 @@ describe('comment-pr-findings.js', () => {
435435
const mockFindings = [{
436436
file: 'test.py',
437437
line: 10,
438-
message: 'Insecure pickle usage detected',
438+
description: 'Insecure pickle usage detected',
439439
severity: 'HIGH',
440-
metadata: {
441-
vulnerability_type: 'security_issue',
442-
tool: 'ClaudeCode AI Security Analysis',
443-
check_id: 'pickle-insecure-usage'
444-
}
440+
category: 'security'
445441
}];
446442

447443
const mockPrFiles = [{
@@ -491,8 +487,8 @@ describe('comment-pr-findings.js', () => {
491487
const comment = capturedReviewData.comments[0];
492488
expect(comment.body).toContain('🤖 **Code Review Finding:');
493489
expect(comment.body).toContain('**Severity:** HIGH');
494-
expect(comment.body).toContain('**Category:** security_issue');
495-
expect(comment.body).toContain('**Tool:** ClaudeCode AI Security Analysis');
490+
expect(comment.body).toContain('**Category:** security');
491+
expect(comment.body).toContain('**Tool:** ClaudeCode AI Review');
496492
expect(consoleLogSpy).toHaveBeenCalledWith('Created review with 1 inline comments');
497493
});
498494
});

0 commit comments

Comments
 (0)