quickfix failing tests

This commit is contained in:
Sebastian Qvarfordt
2020-06-02 15:03:11 +02:00
parent dc81a30ff4
commit 8e6df5f575
4 changed files with 7 additions and 4 deletions
@@ -22,7 +22,10 @@ import { wrapInTestApp } from '@backstage/test-utils';
import { catalogApiRef } from '../..';
const errorApi = { post: () => {} };
const catalogApi = { getEntities: () => Promise.resolve([{ kind: '' }]) };
const catalogApi = {
getEntities: () => Promise.resolve([{ kind: '', metadata: {} }]),
getLocationByEntity: () => Promise.resolve({ data: {} }),
};
describe('CatalogPage', () => {
// this test right now causes some red lines in the log output when running tests
@@ -42,7 +42,7 @@ type CatalogTableProps = {
titlePreamble: string;
loading: boolean;
error?: any;
actions: any;
actions?: any;
};
const CatalogTable: FC<CatalogTableProps> = ({
components,
+1 -1
View File
@@ -17,5 +17,5 @@ export type Component = {
name: string;
kind: string;
description: string;
location: any;
location?: any;
};
+1 -1
View File
@@ -18,7 +18,7 @@ import { Entity } from '@backstage/catalog-model';
export function envelopeToComponent(
envelope: Entity,
location: any,
location?: any,
): Component {
return {
name: envelope.metadata?.name ?? '',