antv-l7/packages/scene/__tests__/index.spec.ts

25 lines
604 B
TypeScript
Raw Normal View History

// @ts-ignore
2020-02-08 01:51:17 +08:00
import { Mapbox } from '@antv/l7-maps';
import { Scene } from '../src/';
describe('template', () => {
const el = document.createElement('div');
el.id = 'test-div-id';
2020-02-08 01:51:17 +08:00
el.style.width = '500px';
el.style.height = '500px';
document.querySelector('body')?.appendChild(el);
2020-02-08 01:51:17 +08:00
const scene = new Scene({
id: 'test-div-id',
map: new Mapbox({
style: 'dark',
center: [110.19382669582967, 30.258134],
pitch: 0,
zoom: 3,
}),
});
2020-02-08 01:51:17 +08:00
it('scene map method', () => {
expect(scene.getZoom()).toEqual(3);
expect(scene.getPitch()).toEqual(0);
});
});