Skip to content

Commit

Permalink
jest - clean up noise from test logs
Browse files Browse the repository at this point in the history
  • Loading branch information
tplevko authored and lordrip committed Mar 14, 2024
1 parent a1d62e4 commit f2b6fa9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ describe('DataFormatEditor', () => {
let mockNode: CanvasNode;
let dataformatCatalog: Record<string, ICamelDataformatDefinition>;
beforeAll(async () => {
jest.spyOn(console, 'error').mockImplementation(() => {});
dataformatCatalog = await import('@kaoto-next/camel-catalog/' + catalogIndex.catalogs.dataformats.file);
/* eslint-disable @typescript-eslint/no-explicit-any */
delete (dataformatCatalog as any).default;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ describe('Canvas', () => {
const entity2 = { ...entity, id: 'route-9999' } as CamelRouteVisualEntity;

it('should render correctly', async () => {
jest.spyOn(console, 'error').mockImplementation(() => {});
const result = render(
<TestProvidersWrapper
visibleFlows={{ visibleFlows: { ['route-8888']: true } } as unknown as VisibleFLowsContextResult}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,7 @@ describe('CanvasForm', () => {
*/

it('should render for all component without an error', async () => {
jest.spyOn(console, 'error').mockImplementation(() => {});
const componentCatalogMap = await import('@kaoto-next/camel-catalog/' + catalogIndex.catalogs.components.file);
Object.entries(componentCatalogMap).forEach(([name, catalog]) => {
try {
Expand All @@ -521,6 +522,7 @@ describe('CanvasForm', () => {
});

it('should render for all kamelets without an error', async () => {
jest.spyOn(console, 'error').mockImplementation(() => {});
const kameletCatalogMap = await import('@kaoto-next/camel-catalog/' + catalogIndex.catalogs.kamelets.file);
Object.entries(kameletCatalogMap).forEach(([name, kamelet]) => {
try {
Expand Down

0 comments on commit f2b6fa9

Please sign in to comment.