Skip to content

Commit 15e765a

Browse files
committed
【fix】UT
1 parent e43815c commit 15e765a

File tree

1 file changed

+5
-18
lines changed

1 file changed

+5
-18
lines changed

test/maplibregl/overlay/FGBLayerSpec.js

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,10 @@ describe('maplibregl_FGBLayer', () => {
2929
center: [0, 0],
3030
zoom: 3
3131
});
32-
console.log(123)
3332
map.on('load', function () {
34-
console.log(334)
3533
done();
3634
});
37-
});
35+
},50000);
3836
beforeEach(() => {
3937
originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;
4038
jasmine.DEFAULT_TIMEOUT_INTERVAL = 50000;
@@ -86,19 +84,12 @@ describe('maplibregl_FGBLayer', () => {
8684
});
8785

8886
it('set extent', (done) => {
89-
var count = 0;
9087
var fgblayer = new FGBLayer({
9188
url: fgbUrl,
9289
extent: [0, 0, 21, 21],
9390
featureLoader: function (feature) {
94-
if (count === 1) {
95-
expect(feature.properties['CAPITAL']).toBe('圣多美');
96-
}
97-
count++;
98-
console.log(count)
99-
if (count === 3) {
100-
done();
101-
}
91+
expect(feature.properties['CAPITAL']).toBe('圣多美');
92+
done();
10293
return feature;
10394
}
10495
});
@@ -113,14 +104,10 @@ describe('maplibregl_FGBLayer', () => {
113104
url: fgbUrl,
114105
extent: [0, 0, 21, 21],
115106
featureLoader: function (feature) {
116-
if (count === 1) {
117-
expect(feature.properties['CAPITAL']).toBe('圣多美');
118-
}
107+
expect(feature.properties['CAPITAL']).toBe('圣多美');
119108
count++;
120109
console.log(count)
121-
if (count === 3) {
122-
done();
123-
}
110+
done();
124111
return feature;
125112
}
126113
});

0 commit comments

Comments
 (0)