From f2b6fa97859e0c034e5647f7a365e1632c180db1 Mon Sep 17 00:00:00 2001 From: tplevko Date: Thu, 14 Mar 2024 10:45:49 +0100 Subject: [PATCH] jest - clean up noise from test logs --- .../ui/src/components/Form/dataFormat/DataFormatEditor.test.tsx | 1 + packages/ui/src/components/Visualization/Canvas/Canvas.test.tsx | 1 + .../ui/src/components/Visualization/Canvas/CanvasForm.test.tsx | 2 ++ 3 files changed, 4 insertions(+) diff --git a/packages/ui/src/components/Form/dataFormat/DataFormatEditor.test.tsx b/packages/ui/src/components/Form/dataFormat/DataFormatEditor.test.tsx index 2491a1d55..5b8093c5c 100644 --- a/packages/ui/src/components/Form/dataFormat/DataFormatEditor.test.tsx +++ b/packages/ui/src/components/Form/dataFormat/DataFormatEditor.test.tsx @@ -12,6 +12,7 @@ describe('DataFormatEditor', () => { let mockNode: CanvasNode; let dataformatCatalog: Record; 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; diff --git a/packages/ui/src/components/Visualization/Canvas/Canvas.test.tsx b/packages/ui/src/components/Visualization/Canvas/Canvas.test.tsx index a85e75755..8fcde2f1d 100644 --- a/packages/ui/src/components/Visualization/Canvas/Canvas.test.tsx +++ b/packages/ui/src/components/Visualization/Canvas/Canvas.test.tsx @@ -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( { */ 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 { @@ -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 {