mirror of
https://github.com/pnpm/pnpm.git
synced 2026-01-28 00:40:38 -05:00
close #3944 Co-authored-by: liucheng.leo <chengcyber@outlook.com> Co-authored-by: Zoltan Kochan <z@kochan.io>
15 lines
998 B
TypeScript
15 lines
998 B
TypeScript
import parsePref from '@pnpm/git-resolver/lib/parsePref'
|
|
|
|
test.each([
|
|
['ssh://username:password@example.com:repo.git', 'ssh://username:password@example.com/repo.git'],
|
|
['ssh://username:password@example.com:repo/@foo.git', 'ssh://username:password@example.com/repo/@foo.git'],
|
|
['ssh://username:password@example.com:22/repo/@foo.git', 'ssh://username:password@example.com:22/repo/@foo.git'],
|
|
['ssh://username:password@example.com:22repo/@foo.git', 'ssh://username:password@example.com/22repo/@foo.git'],
|
|
['git+ssh://username:password@example.com:repo.git', 'ssh://username:password@example.com/repo.git'],
|
|
['git+ssh://username:password@example.com:repo/@foo.git', 'ssh://username:password@example.com/repo/@foo.git'],
|
|
['git+ssh://username:password@example.com:22/repo/@foo.git', 'ssh://username:password@example.com:22/repo/@foo.git'],
|
|
])('the right colon is escaped in %s', async (input, output) => {
|
|
const parsed = await parsePref(input)
|
|
expect(parsed?.fetchSpec).toBe(output)
|
|
})
|