Skip to content

Commit

Permalink
test: 测试案例配置
Browse files Browse the repository at this point in the history
  • Loading branch information
lvisei committed Sep 20, 2023
1 parent 9a9fa41 commit 1e17843
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
4 changes: 2 additions & 2 deletions packages/l7plot/__tests__/helper/plot.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createDiv } from './dom';
import { Plot } from '../../src/core/plot';
import { L7PlotOptions, PlotOptions } from '../../src/types';
import { L7Plot } from '../../src/plot';
import { L7PlotOptions, PlotOptions } from '../../src/types';
import { createDiv } from './dom';

const mapConfig = {
type: 'mapbox',
Expand Down
15 changes: 9 additions & 6 deletions packages/l7plot/__tests__/unit/plots/heatmap/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createPlot } from '../../../helper/plot';
import { Heatmap, HeatmapOptions } from '../../../../src';
import { DEFAULT_OPTIONS } from '../../../../src/plots/heatmap/constants';
import data from '../../../data-set/heat-map.json';
import { createPlot } from '../../../helper/plot';

describe('heatmap', () => {
it('defaultOptions', () => {
Expand Down Expand Up @@ -29,8 +29,11 @@ describe('heatmap', () => {
it('event', () => {
const heatmap = createPlot<Heatmap, HeatmapOptions>(Heatmap, {
source: {
data: [{ y: 19.1, t: 24.6, s: '海南', x: 108.6167 }],
parser: { type: 'json' },
data: data,
parser: { type: 'geojson' },
},
size: {
field: 'mag',
},
});

Expand All @@ -50,11 +53,11 @@ describe('heatmap', () => {
it('legend', () => {
const heatmap = createPlot<Heatmap, HeatmapOptions>(Heatmap, {
source: {
data: [{ y: 19.1, t: 24.6, s: '海南', x: 108.6167 }],
parser: { type: 'json' },
data: data,
parser: { type: 'geojson' },
},
size: {
field: 't',
field: 'mag',
value: [0, 1],
},
style: {
Expand Down

0 comments on commit 1e17843

Please sign in to comment.