diff --git a/__tests__/utils.test.ts b/__tests__/utils.test.ts index 95fa8f3..d0c5d9b 100644 --- a/__tests__/utils.test.ts +++ b/__tests__/utils.test.ts @@ -51,5 +51,18 @@ describe('utils test', () => { ) expect(result).toBe('`@ry-itto`') }) + + it('multiple slackUsernames', () => { + const slackUsernames = ` + ry-itto,ito ryoya + github,octocat + ` + const body = 'ry-itto and github' + const result = replaceGitHubUsernameWithSlackUsername( + body, + slackUsernames + ) + expect(result).toBe('<@ito ryoya> and <@octocat>') + }) }) })