Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit a0c17a7

Browse files
committed
Test failing to generate search URLs from non-GitHub remotes
1 parent ebee260 commit a0c17a7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Diff for: test/models/search.test.js

+7
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ describe('Search', function() {
1313
);
1414
});
1515

16+
it('throws an error when attempting to generate a dotcom URL from a non-dotcom remote', function() {
17+
const nonDotCom = new Remote('elsewhere', 'git://git.gnupg.org/gnupg.git');
18+
19+
const s = new Search('zzz', 'type:pr is:open');
20+
assert.throws(() => s.getWebURL(nonDotCom), /non-GitHub remote/);
21+
});
22+
1623
describe('when scoped to a remote', function() {
1724
it('is a null search when the remote is not present', function() {
1825
const s = Search.inRemote(nullRemote, 'name', 'query');

0 commit comments

Comments
 (0)