forked from forgejo/forgejo
Fix links for the menus in the view file page (#22795)
This commit is contained in:
parent
d5fa2e7510
commit
2c6cc0b8c9
4 changed files with 24 additions and 12 deletions
|
@ -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');
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue