1
0
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:
Henry Heino
2024-04-25 06:02:10 -07:00
committed by GitHub
parent 34b265475d
commit aec77b543c
11 changed files with 289 additions and 62 deletions

View File

@ -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);
});
});