Skip to content

Commit d4bcc4c

Browse files
author
xueren.dt
committed
fix(ava): fix test problem
1 parent a0d5696 commit d4bcc4c

2 files changed

Lines changed: 28 additions & 0 deletions

File tree

__tests__/__mocks__/gpt-vis.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// mock for @antv/gpt-vis used in tests to avoid ESM import issues
2+
export enum ChartType {
3+
Area = 'Area',
4+
Bar = 'Bar',
5+
Boxplot = 'Boxplot',
6+
Column = 'Column',
7+
DualAxes = 'DualAxes',
8+
FishboneDiagram = 'FishboneDiagram',
9+
FlowDiagram = 'FlowDiagram',
10+
Funnel = 'Funnel',
11+
Histogram = 'Histogram',
12+
Line = 'Line',
13+
Liquid = 'Liquid',
14+
MindMap = 'MindMap',
15+
NetworkGraph = 'NetworkGraph',
16+
OrganizationChart = 'OrganizationChart',
17+
PathMap = 'PathMap',
18+
Pie = 'Pie',
19+
PinMap = 'PinMap',
20+
Radar = 'Radar',
21+
Sankey = 'Sankey',
22+
Scatter = 'Scatter',
23+
Treemap = 'Treemap',
24+
Venn = 'Venn',
25+
Violin = 'Violin',
26+
WordCloud = 'WordCloud',
27+
}

jest.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,6 @@ module.exports = {
1818
moduleNameMapper: {
1919
'^@antv/ava': ['<rootDir>/src/index.ts'],
2020
'^@ava/(.*)$': '<rootDir>/src/$1',
21+
'^@antv/gpt-vis$': '<rootDir>/__tests__/__mocks__/gpt-vis.ts',
2122
},
2223
};

0 commit comments

Comments
 (0)