From 09fc040eec6f374f970db948f4534181edfe0e08 Mon Sep 17 00:00:00 2001 From: Erik Engervall Date: Thu, 29 Apr 2021 10:57:39 +0200 Subject: [PATCH] Address PR comment regarding ConfigReader mocking Signed-off-by: Erik Engervall --- .../src/api/PluginApiClient.test.ts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/plugins/github-release-manager/src/api/PluginApiClient.test.ts b/plugins/github-release-manager/src/api/PluginApiClient.test.ts index 867974b80b..d4f86ef9e7 100644 --- a/plugins/github-release-manager/src/api/PluginApiClient.test.ts +++ b/plugins/github-release-manager/src/api/PluginApiClient.test.ts @@ -14,19 +14,13 @@ * limitations under the License. */ -import { OAuthApi } from '@backstage/core'; +import { ConfigReader, OAuthApi } from '@backstage/core'; import { PluginApiClient } from './PluginApiClient'; -jest.mock('@backstage/integration', () => ({ - readGitHubIntegrationConfigs: jest.fn(() => []), -})); - describe('PluginApiClient', () => { it('should return the default plugin api client', () => { - const configApi = { - getOptionalConfigArray: jest.fn(), - } as any; + const configApi = new ConfigReader({}); const githubAuthApi: OAuthApi = { getAccessToken: jest.fn(), };