mirror of https://github.com/go-gitea/gitea.git
You cannot 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
TypeScript
14 lines
456 B
TypeScript
8 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');
|
||
|
});
|
||
12 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);
|
||
|
});
|