You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-07-13 00:10:37 +02:00
Mobile: Plugin support: Simplify reporting plugin issues (#10319)
This commit is contained in:
@ -0,0 +1,17 @@
|
||||
import getPluginIssueReportUrl from './getPluginIssueReportUrl';
|
||||
|
||||
describe('getPluginIssueReportUrl', () => {
|
||||
test.each([
|
||||
[{ repository_url: 'http://github.com/laurent22/joplin' }, 'https://github.com/laurent22/joplin/issues'],
|
||||
[{ repository_url: 'https://www.github.com/laurent22/joplin' }, 'https://github.com/laurent22/joplin/issues'],
|
||||
[{ repository_url: 'https://www.github.com/laurent22/joplin.git' }, 'https://github.com/laurent22/joplin/issues'],
|
||||
[{ homepage_url: 'https://www.github.com/laurent22/joplin' }, 'https://github.com/laurent22/joplin/issues'],
|
||||
|
||||
[{ homepage_url: 'https://gitlab.com/laurent22/joplin' }, 'https://gitlab.com/laurent22/joplin/-/issues'],
|
||||
[{ homepage_url: 'https://www.gitlab.com/laurent22/joplin' }, 'https://gitlab.com/laurent22/joplin/-/issues'],
|
||||
|
||||
[{ homepage_url: 'https://example.com/laurent22/joplin' }, null],
|
||||
])('should return the issue URL (case %#)', async (manifest, expectedUrl) => {
|
||||
expect(getPluginIssueReportUrl(manifest)).toBe(expectedUrl);
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user