From 8ddbd58344b83921fb23d91038b55bb63c6c30fb Mon Sep 17 00:00:00 2001 From: Terrence Keane Date: Tue, 10 Dec 2024 15:36:22 -0500 Subject: [PATCH] Fix tests --- charts/core/src/Chart/hooks/useChart.spec.ts | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/charts/core/src/Chart/hooks/useChart.spec.ts b/charts/core/src/Chart/hooks/useChart.spec.ts index 2ede70a6c9..2a211bc9d5 100644 --- a/charts/core/src/Chart/hooks/useChart.spec.ts +++ b/charts/core/src/Chart/hooks/useChart.spec.ts @@ -6,7 +6,7 @@ import { SeriesOption } from '../Chart.types'; import { useChart } from './useChart'; -jest.mock('echarts/core', () => ({ +jest.mock('echarts', () => ({ init: jest.fn(() => ({ setOption: jest.fn(), dispose: jest.fn(), @@ -16,22 +16,6 @@ jest.mock('echarts/core', () => ({ use: jest.fn(), })); -jest.mock('echarts/charts', () => ({ - LineChart: jest.fn(), -})); - -jest.mock('echarts/components', () => ({ - TitleComponent: jest.fn(), - TooltipComponent: jest.fn(), - GridComponent: jest.fn(), - LegendComponent: jest.fn(), - ToolboxComponent: jest.fn(), -})); - -jest.mock('echarts/renderers', () => ({ - CanvasRenderer: jest.fn(), -})); - describe('@lg-echarts/core/hooks/useChart', () => { test('should return an object with the correct properties', () => { const { result } = renderHook(() => useChart({ theme: 'dark' }));