๐Ÿ“ฆ ljharb / can-merge

๐Ÿ“„ parseRemoteUrl.js ยท 26 lines
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26'use strict';

const test = require('tape');

const parseRemoteUrl = require('../utils/parseRemoteUrl');

test('parseRemoteUrl', (t) => {
	const result = 'ljharb/can-merge';
	t.deepEqual(
		parseRemoteUrl('https://github.com/ljharb/can-merge.git'),
		result,
		'parse https url',
	);
	t.deepEqual(
		parseRemoteUrl('http://github.com/ljharb/can-merge.git'),
		result,
		'parse http url',
	);
	t.deepEqual(
		parseRemoteUrl('git@github.com/ljharb/can-merge.git'),
		result,
		'parse git url',
	);
	t.end();
});