Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tsck committed Dec 10, 2024
1 parent e328989 commit 8ddbd58
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions charts/core/src/Chart/hooks/useChart.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand All @@ -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' }));
Expand Down

0 comments on commit 8ddbd58

Please sign in to comment.