mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-23 22:05:43 +03:00
23ae939ef3
Follow #24479 ![image](https://user-images.githubusercontent.com/2114189/236694114-c5cb42ff-456d-465a-bcb9-89ed5959d346.png) ![image](https://user-images.githubusercontent.com/2114189/236694119-052e689c-6264-4468-9ab3-0e5c97521bec.png) ![image](https://user-images.githubusercontent.com/2114189/236694139-f8940765-42ce-462d-b49e-50a416cc6f85.png) ![image](https://user-images.githubusercontent.com/2114189/236694154-6d8a000c-9ef3-4d07-af1c-59b0cf8f4d33.png) ![image](https://user-images.githubusercontent.com/2114189/236694166-3bc3e585-7955-44aa-af34-b33ae91e132f.png) --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Giteabot <teabot@gitea.io>
17 lines
942 B
JavaScript
17 lines
942 B
JavaScript
import {test, expect} from 'vitest';
|
|
import {parseIssueListQuickGotoLink} from './common-issue-list.js';
|
|
|
|
test('parseIssueListQuickGotoLink', () => {
|
|
expect(parseIssueListQuickGotoLink('/link', '')).toEqual('');
|
|
expect(parseIssueListQuickGotoLink('/link', 'abc')).toEqual('');
|
|
expect(parseIssueListQuickGotoLink('/link', '123')).toEqual('/link/issues/123');
|
|
expect(parseIssueListQuickGotoLink('/link', '#123')).toEqual('/link/issues/123');
|
|
expect(parseIssueListQuickGotoLink('/link', 'owner/repo#123')).toEqual('');
|
|
|
|
expect(parseIssueListQuickGotoLink('', '')).toEqual('');
|
|
expect(parseIssueListQuickGotoLink('', 'abc')).toEqual('');
|
|
expect(parseIssueListQuickGotoLink('', '123')).toEqual('');
|
|
expect(parseIssueListQuickGotoLink('', '#123')).toEqual('');
|
|
expect(parseIssueListQuickGotoLink('', 'owner/repo#')).toEqual('');
|
|
expect(parseIssueListQuickGotoLink('', 'owner/repo#123')).toEqual('/owner/repo/issues/123');
|
|
});
|