diff --git a/app/comments.test.js b/app/comments.test.js index 9632545..78b0e0f 100644 --- a/app/comments.test.js +++ b/app/comments.test.js @@ -163,6 +163,7 @@ describe('postNewCriticalComments', () => { }); it('handles multiple criticals, posting inline where possible and degrading the rest', async () => { + const criticalCommentPattern = /嚴重問題/; const inlineCalls = []; const issueCalls = []; const findings = [ @@ -181,6 +182,6 @@ describe('postNewCriticalComments', () => { assert.equal(inlineCalls[0].path, 'app/a.js'); assert.equal(inlineCalls[0].line, 10); assert.equal(issueCalls.length, 2); - assert.ok(issueCalls.every(b => /嚴重問題/.test(b))); + assert.ok(issueCalls.every(b => criticalCommentPattern.test(b))); }); });