-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
test.js
16 lines (15 loc) · 902 Bytes
/
test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import test from 'ava';
import humanizeUrl from './index.js';
test('main', t => {
t.is(humanizeUrl('http://sindresorhus.com'), 'sindresorhus.com');
t.is(humanizeUrl(' http://sindresorhus.com '), 'sindresorhus.com');
t.is(humanizeUrl('https://sindresorhus.com'), 'sindresorhus.com');
t.is(humanizeUrl('https://user:[email protected]'), 'sindresorhus.com');
t.is(humanizeUrl('http://www.sindresorhus.com'), 'sindresorhus.com');
t.is(humanizeUrl('www.sindresorhus.com'), 'sindresorhus.com');
t.is(humanizeUrl('http://sindresorhus.com/'), 'sindresorhus.com');
t.is(humanizeUrl('sindresorhus.com/'), 'sindresorhus.com');
t.is(humanizeUrl('http://sindresorhus.com/foo/'), 'sindresorhus.com/foo');
t.is(humanizeUrl('file:///Users/sindresorhus/dev/humanize-url/'), 'file:///Users/sindresorhus/dev/humanize-url');
t.is(humanizeUrl('https://sindresorhus.com/#foo'), 'sindresorhus.com/#foo');
});