test(comments review): 驗證 Review comments 依嚴重度排序 #34
@@ -208,6 +208,10 @@ describe('postFindingsReview', () => {
|
||||
reviewCalls[0].comments.map(c => c.path),
|
||||
['app/a.js', 'app/b.js', 'app/c.js'],
|
||||
);
|
||||
assert.deepEqual(
|
||||
reviewCalls[0].comments.map(c => c.body.match(/嚴重等級\*\*:(.+)/)?.[1]),
|
||||
['🔴 嚴重', '🟡 警告', '🔵 建議'],
|
||||
);
|
||||
assert.deepEqual(
|
||||
reviewCalls[0].comments.map(c => c.new_position),
|
||||
[10, 20, 30],
|
||||
|
||||
Reference in New Issue
Block a user