Use 'bugs' url if present, fixes #46773

This commit is contained in:
Rachel Macfarlane
2018-03-27 17:15:39 -07:00
parent 5bf4195cc7
commit 41bc888293
4 changed files with 60 additions and 3 deletions
@@ -7,6 +7,7 @@
import * as assert from 'assert';
import { IssueReporterModel } from 'vs/code/electron-browser/issue/issueReporterModel';
import { normalizeGitHubIssuesUrl } from 'vs/code/electron-browser/issue/issueReporterUtil';
suite('IssueReporter', () => {
@@ -36,4 +37,18 @@ OS version: undefined
<!-- generated by issue reporter -->`);
});
test('should normalize GitHub urls', () => {
[
'https://github.com/repo',
'https://github.com/repo/',
'https://github.com/repo.git',
'https://github.com/repo/issues',
'https://github.com/repo/issues/',
'https://github.com/repo/issues/new',
'https://github.com/repo/issues/new/'
].forEach(url => {
assert.equal('https://github.com/repo/issues/new', normalizeGitHubIssuesUrl(url));
});
});
});