mirror of
https://github.com/go-gitea/gitea.git
synced 2024-12-15 01:23:45 +08: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>
18 lines
942 B
JavaScript
18 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');
|
|
});
|