Merge remote-tracking branch 'upstream/main' into aeisenberg/unrevert-query-filters
This commit is contained in:
commit
bcf47202b5
42 changed files with 116 additions and 22 deletions
4
lib/util.test.js
generated
4
lib/util.test.js
generated
|
|
@ -155,24 +155,28 @@ function mockGetMetaVersionHeader(versionHeader) {
|
|||
const v = await util.getGitHubVersion({
|
||||
auth: "",
|
||||
url: "https://github.com",
|
||||
apiURL: undefined,
|
||||
});
|
||||
t.deepEqual(util.GitHubVariant.DOTCOM, v.type);
|
||||
mockGetMetaVersionHeader("2.0");
|
||||
const v2 = await util.getGitHubVersion({
|
||||
auth: "",
|
||||
url: "https://ghe.example.com",
|
||||
apiURL: undefined,
|
||||
});
|
||||
t.deepEqual({ type: util.GitHubVariant.GHES, version: "2.0" }, v2);
|
||||
mockGetMetaVersionHeader("GitHub AE");
|
||||
const ghae = await util.getGitHubVersion({
|
||||
auth: "",
|
||||
url: "https://example.githubenterprise.com",
|
||||
apiURL: undefined,
|
||||
});
|
||||
t.deepEqual({ type: util.GitHubVariant.GHAE }, ghae);
|
||||
mockGetMetaVersionHeader(undefined);
|
||||
const v3 = await util.getGitHubVersion({
|
||||
auth: "",
|
||||
url: "https://ghe.example.com",
|
||||
apiURL: undefined,
|
||||
});
|
||||
t.deepEqual({ type: util.GitHubVariant.DOTCOM }, v3);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue