Skip to content

Commit

Permalink
test: fix tests for getRemoteUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-evans committed Nov 22, 2022
1 parent ff7e3fe commit f575106
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions __test__/utils.unit.test.ts
Expand Up @@ -90,11 +90,14 @@ describe('utils tests', () => {
})

test('getRemoteUrl successfully returns remote URLs', async () => {
const url1 = utils.getRemoteUrl('HTTPS', 'peter-evans/create-pull-request')
const url1 = utils.getRemoteUrl('HTTPS', 'github.com', 'peter-evans/create-pull-request')
expect(url1).toEqual('https://github.com/peter-evans/create-pull-request')

const url2 = utils.getRemoteUrl('SSH', 'peter-evans/create-pull-request')
const url2 = utils.getRemoteUrl('SSH', 'github.com', 'peter-evans/create-pull-request')
expect(url2).toEqual('git@github.com:peter-evans/create-pull-request.git')

const url3 = utils.getRemoteUrl('HTTPS', 'mygithubserver.com', 'peter-evans/create-pull-request')
expect(url3).toEqual('https://mygithubserver.com/peter-evans/create-pull-request')
})

test('secondsSinceEpoch returns the number of seconds since the Epoch', async () => {
Expand Down

0 comments on commit f575106

Please sign in to comment.