Skip to content

Commit

Permalink
Merge pull request #8 from ry-itto/fix/#5/unify_return_types
Browse files Browse the repository at this point in the history
Unify return types to "\n"
  • Loading branch information
Ryoya Ito authored Mar 1, 2021
2 parents 03c72ea + 0087cb1 commit 2c1e3dc
Show file tree
Hide file tree
Showing 4 changed files with 10,419 additions and 3,447 deletions.
12 changes: 12 additions & 0 deletions __tests__/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,17 @@ describe('utils test', () => {
)
expect(result).toBe('<@ito ryoya> and <@octocat>')
})

it('multiple newline types slackUsernames', () => {
const slackUsernames = `
ry-itto,ito ryoya\ngithub,octocat\r\ngitlab,fox
`
const body = 'ry-itto, github, gitlab'
const result = replaceGitHubUsernameWithSlackUsername(
body,
slackUsernames
)
expect(result).toBe('<@ito ryoya>, <@octocat>, <@fox>')
})
})
})
Loading

0 comments on commit 2c1e3dc

Please sign in to comment.