Skip to content

Commit

Permalink
add test case of multiple slackUsernames
Browse files Browse the repository at this point in the history
  • Loading branch information
ryoya ito committed Feb 26, 2021
1 parent 0831a78 commit 74c6d7c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions __tests__/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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>')
})
})
})

0 comments on commit 74c6d7c

Please sign in to comment.