Use the API URL from the environment if it is present.
This commit is contained in:
parent
a6d09016e7
commit
bbdc9efa94
42 changed files with 122 additions and 22 deletions
|
|
@ -207,6 +207,7 @@ test("getGitHubVersion", async (t) => {
|
|||
const v = await util.getGitHubVersion({
|
||||
auth: "",
|
||||
url: "https://github.com",
|
||||
apiURL: undefined,
|
||||
});
|
||||
t.deepEqual(util.GitHubVariant.DOTCOM, v.type);
|
||||
|
||||
|
|
@ -214,6 +215,7 @@ test("getGitHubVersion", async (t) => {
|
|||
const v2 = await util.getGitHubVersion({
|
||||
auth: "",
|
||||
url: "https://ghe.example.com",
|
||||
apiURL: undefined,
|
||||
});
|
||||
t.deepEqual(
|
||||
{ type: util.GitHubVariant.GHES, version: "2.0" } as util.GitHubVersion,
|
||||
|
|
@ -224,6 +226,7 @@ test("getGitHubVersion", async (t) => {
|
|||
const ghae = await util.getGitHubVersion({
|
||||
auth: "",
|
||||
url: "https://example.githubenterprise.com",
|
||||
apiURL: undefined,
|
||||
});
|
||||
t.deepEqual({ type: util.GitHubVariant.GHAE }, ghae);
|
||||
|
||||
|
|
@ -231,6 +234,7 @@ test("getGitHubVersion", async (t) => {
|
|||
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