diff --git a/src/api-client.test.ts b/src/api-client.test.ts index b9e8dcd0d..f18f31415 100644 --- a/src/api-client.test.ts +++ b/src/api-client.test.ts @@ -52,7 +52,6 @@ function mockGetMetaVersionHeader( }; const spyGetContents = sinon .stub(client.rest.meta, "get") - .resolves(response as any); sinon.stub(api, "getApiClient").value(() => client); return spyGetContents; diff --git a/src/api-client.ts b/src/api-client.ts index 622830af5..ee402dc50 100644 --- a/src/api-client.ts +++ b/src/api-client.ts @@ -116,7 +116,6 @@ export async function getGitHubVersionFromApi( // Doesn't strictly have to be the meta endpoint as we're only // using the response headers which are available on every request. - const response = await apiClient.rest.meta.get(); // This happens on dotcom, although we expect to have already returned in that diff --git a/src/config-utils.test.ts b/src/config-utils.test.ts index 0617b216f..2cac112e0 100644 --- a/src/config-utils.test.ts +++ b/src/config-utils.test.ts @@ -115,7 +115,6 @@ function mockGetContents( }; const spyGetContents = sinon .stub(client.rest.repos, "getContent") - .resolves(response as any); sinon.stub(api, "getApiClient").value(() => client); sinon.stub(api, "getApiClientWithExternalAuth").value(() => client); @@ -131,7 +130,6 @@ function mockListLanguages(languages: string[]) { for (const language of languages) { response.data[language] = 123; } - sinon.stub(client.rest.repos, "listLanguages").resolves(response as any); sinon.stub(api, "getApiClient").value(() => client); } diff --git a/tsconfig.json b/tsconfig.json index 328c43558..07453aca7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -25,6 +25,7 @@ "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ /* Module Resolution Options */ + "baseUrl": ".", /* Base directory to resolve non-absolute module names. */ "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ "resolveJsonModule": true, "paths": {