Address PR comment regarding ConfigReader mocking

Signed-off-by: Erik Engervall <erik.engervall@gmail.com>
This commit is contained in:
Erik Engervall
2021-04-29 10:57:39 +02:00
parent ac64ec2228
commit 09fc040eec
@@ -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(),
};