mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-05-24 10:37:47 +08:00
Fix links for the menus in the view file page (#22795)
This commit is contained in:
@ -139,6 +139,11 @@ test('blobToDataURI', async () => {
|
||||
});
|
||||
|
||||
test('toAbsoluteUrl', () => {
|
||||
expect(toAbsoluteUrl('//host/dir')).toEqual('http://host/dir');
|
||||
expect(toAbsoluteUrl('https://host/dir')).toEqual('https://host/dir');
|
||||
|
||||
expect(toAbsoluteUrl('')).toEqual('http://localhost:3000');
|
||||
expect(toAbsoluteUrl('/user/repo')).toEqual('http://localhost:3000/user/repo');
|
||||
|
||||
expect(() => toAbsoluteUrl('path')).toThrowError('unsupported');
|
||||
});
|
||||
|
Reference in New Issue
Block a user