Skip to content

Commit 9b3fefb

Browse files
committed
【ut】fix ut
1 parent 49e6361 commit 9b3fefb

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

test/mapboxgl/mapping/WebMapV2Spec.js

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,6 @@ import { ArrayStatistic } from '@supermapgis/iclient-common/util/ArrayStatistic'
66
import { FetchRequest } from '@supermapgis/iclient-common/util/FetchRequest';
77
import '../../resources/WebMapV5.js';
88

9-
window.jsonsql = { query: () => [{}] };
10-
11-
window.canvg = {
12-
default: {
13-
from: (ctx, url, callback) =>
14-
Promise.resolve({ stop: jasmine.createSpy('stop'), start: jasmine.createSpy('start') })
15-
}
16-
};
17-
18-
window.geostats = class {
19-
setSerie() {}
20-
};
21-
22-
window.EchartsLayer = class {
23-
constructor() {
24-
this.chart = {
25-
setOption() {}
26-
};
27-
}
28-
};
29-
309
function DataFlowService(serviceUrl) {
3110
const dataflowFeature = {
3211
geometry: {
@@ -327,6 +306,23 @@ describe('mapboxgl_WebMapV2', () => {
327306
window.document.body.appendChild(testDiv);
328307
originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;
329308
jasmine.DEFAULT_TIMEOUT_INTERVAL = 50000;
309+
window.jsonsql = { query: () => [{}] };
310+
window.canvg = {
311+
default: {
312+
from: (ctx, url, callback) =>
313+
Promise.resolve({ stop: jasmine.createSpy('stop'), start: jasmine.createSpy('start') })
314+
}
315+
};
316+
window.geostats = class {
317+
setSerie() {}
318+
};
319+
window.EchartsLayer = class {
320+
constructor() {
321+
this.chart = {
322+
setOption() {}
323+
};
324+
}
325+
};
330326
});
331327
afterEach(() => {
332328
if (datavizWebmap) {
@@ -340,6 +336,10 @@ describe('mapboxgl_WebMapV2', () => {
340336
window.document.body.removeChild(testDiv);
341337
jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout;
342338
mapboxgl.CRS = undefined;
339+
window.jsonsql = undefined;
340+
window.canvg = undefined;
341+
window.geostats = undefined;
342+
window.EchartsLayer = undefined;
343343
});
344344

345345
it('test baseLayer layers count maploaded', (done) => {

0 commit comments

Comments
 (0)