Skip to content

Commit 44dfd53

Browse files
committed
【fix】UT
1 parent 876218f commit 44dfd53

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

test/maplibregl/overlay/FGBLayerSpec.js

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,17 @@ describe('maplibregl_FGBLayer', () => {
8484
});
8585

8686
it('set extent', (done) => {
87+
var count = 0;
8788
var fgblayer = new FGBLayer({
8889
url: fgbUrl,
8990
extent: [0, 0, 21, 21],
9091
featureLoader: function (feature) {
92+
count++;
93+
console.log(count, feature.properties);
9194
expect(feature.properties['CAPITAL']).toBe('圣多美');
92-
done();
95+
if(count === 2){
96+
done();
97+
}
9398
return feature;
9499
}
95100
});
@@ -104,10 +109,12 @@ describe('maplibregl_FGBLayer', () => {
104109
url: fgbUrl,
105110
extent: [0, 0, 21, 21],
106111
featureLoader: function (feature) {
107-
expect(feature.properties['CAPITAL']).toBe('圣多美');
108112
count++;
109-
console.log(count)
110-
done();
113+
console.log(count, feature.properties);
114+
expect(feature.properties['CAPITAL']).toBe('圣多美');
115+
if(count === 2){
116+
done();
117+
}
111118
return feature;
112119
}
113120
});

0 commit comments

Comments
 (0)