From 71fb6da231ca1216ecee56dac4b223b1373bc2c5 Mon Sep 17 00:00:00 2001 From: b12f Date: Fri, 20 Dec 2024 15:11:50 +0100 Subject: [PATCH] test: add test for alternative git ssh user name --- __test__/git-config-helper.unit.test.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/__test__/git-config-helper.unit.test.ts b/__test__/git-config-helper.unit.test.ts index 8527471..32a13c6 100644 --- a/__test__/git-config-helper.unit.test.ts +++ b/__test__/git-config-helper.unit.test.ts @@ -66,6 +66,13 @@ describe('git-config-helper unit tests', () => { expect(remote3.hostname).toEqual('github.internal.company') expect(remote3.protocol).toEqual('SSH') expect(remote3.repository).toEqual('peter-evans/create-pull-request') + + const remote4 = GitConfigHelper.parseGitRemote( + 'gitea@github.internal.company:peter-evans/create-pull-request.git' + ) + expect(remote4.hostname).toEqual('github.internal.company') + expect(remote4.protocol).toEqual('SSH') + expect(remote4.repository).toEqual('peter-evans/create-pull-request') }) test('parseGitRemote successfully parses GIT remote URLs', async () => {