Skip to content

Commit 49d3fd0

Browse files
committed
Revert WebMapV3Spec.js changes from 3c0fafe
1 parent 3c0fafe commit 49d3fd0

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎test/maplibregl/mapping/WebMapV3Spec.js‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ describe('maplibregl-webmap3.0', () => {
4747
mbglmap.prototype.getL7Scene = maplibregl.Map.prototype.getL7Scene;
4848
maplibregl.CRS = CRS;
4949
maplibregl.proj4 = proj4;
50-
// 所有测试统一 mock maplibregl.Map,避免用真实 Map 实例引发 WebGL 初始化挂起
51-
spyOn(maplibregl, 'Map').and.callFake(mbglmap);
5250
});
5351
afterEach(() => {
5452
if (mapstudioWebmap && mapstudioWebmap.map) {
@@ -286,6 +284,7 @@ describe('maplibregl-webmap3.0', () => {
286284
}
287285
return Promise.resolve();
288286
});
287+
spyOn(maplibregl, 'Map').and.callFake(mbglmap);
289288
const mapInfo = JSON.parse(mapstudioWebMap_symbol);
290289
const nextMapInfo = {
291290
...mapInfo,
@@ -1044,6 +1043,7 @@ describe('maplibregl-webmap3.0', () => {
10441043
}
10451044
return Promise.resolve();
10461045
});
1046+
spyOn(maplibregl, 'Map').and.callFake(mbglmap);
10471047
const mapInfo = JSON.parse(mapstudioWebMap_symbol);
10481048
const crsInfo = {
10491049
name: 'EPSG:4490',
@@ -1174,6 +1174,7 @@ describe('maplibregl-webmap3.0', () => {
11741174
}
11751175
return Promise.resolve();
11761176
});
1177+
spyOn(maplibregl, 'Map').and.callFake(mbglmap);
11771178
const mapInfo = JSON.parse(mapstudioWebMap_symbol);
11781179
mapInfo.sprite = {
11791180
rectangle: 'http://localhost:9876/base/resources/data/sprite/rectangle',

0 commit comments

Comments
 (0)