Skip to content

Commit e4acdd4

Browse files
committed
fixing vt specs
1 parent cf98306 commit e4acdd4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/vt/test/specs/update.vector.symbol.spec.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ describe('vector layers symbol update specs', () => {
273273
layer.on('partialupdate', () => {
274274
partialUpdate = true;
275275
});
276+
let doneCalled = false;
276277
group.on('layerload', () => {
277278
if (count >= 1 && !updated) {
278279
const pixel = readPixel(renderer.canvas, x + 38, y);
@@ -283,12 +284,13 @@ describe('vector layers symbol update specs', () => {
283284
}
284285
]);
285286
updated = true;
286-
} else if (updated && count >= 4) {
287+
} else if (updated && count >= 4 && !doneCalled) {
287288
const pixel = readPixel(renderer.canvas, x + 37, y);
288289
assert.deepEqual(pixel, [0, 255, 0, 255]);
289290
const pixel1 = readPixel(renderer.canvas, x, y);
290291
assert.deepEqual(pixel1, [255, 0, 0, 255]);
291292
assert(!partialUpdate);
293+
doneCalled = true;
292294
done();
293295
}
294296
});

0 commit comments

Comments
 (0)