mirror of https://github.com/go-gitea/gitea
Git with a cup of tea, painless self-hosted git service
Mirror for internal git.with.parts use
https://git.with.parts
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
456 B
14 lines
456 B
7 months ago
|
import {pathEscapeSegments, isUrl} from './url.ts';
|
||
2 years ago
|
|
||
|
test('pathEscapeSegments', () => {
|
||
|
expect(pathEscapeSegments('a/b/c')).toEqual('a/b/c');
|
||
|
expect(pathEscapeSegments('a/b/ c')).toEqual('a/b/%20c');
|
||
|
});
|
||
11 months ago
|
|
||
|
test('isUrl', () => {
|
||
|
expect(isUrl('https://example.com')).toEqual(true);
|
||
|
expect(isUrl('https://example.com/')).toEqual(true);
|
||
|
expect(isUrl('https://example.com/index.html')).toEqual(true);
|
||
|
expect(isUrl('/index.html')).toEqual(false);
|
||
|
});
|