Add a test for buildEncodedUrl

Protect against regression

Signed-off-by: matt-200 <123186429+matt-200@users.noreply.github.com>
This commit is contained in:
matt-200
2023-01-25 18:34:14 -06:00
committed by GitHub
parent cc926a59bd
commit 21a7b9fd83
@@ -278,3 +278,17 @@ describe('replaceReadme', () => {
expect(expected).toBe(result);
});
});
describe('buildEncodedUrl', () => {
it('should not encode the colon between host and port', async () => {
const result = await buildEncodedUrl(
'tfs.myorg.com:8443',
'org',
'project',
'repo',
'path'
);
expect(result).toBe('https://tfs.myorg.com:8443/org/project/_git/repo?path=path');
});
});