Webgl points renderer / terminates worker & dispose helper

This commit is contained in:
Olivier Guyot
2019-09-24 17:42:48 +02:00
parent cb2c596a6d
commit 30f19f8317
3 changed files with 25 additions and 0 deletions

View File

@@ -254,4 +254,20 @@ describe('ol.renderer.webgl.PointsLayer', function() {
});
});
describe('#disposeInternal', function() {
it('terminates the worker and calls dispose on the helper', function() {
const layer = new VectorLayer({
source: new VectorSource()
});
const renderer = new WebGLPointsLayerRenderer(layer, {
});
const spyHelper = sinon.spy(renderer.helper, 'disposeInternal');
const spyWorker = sinon.spy(renderer.worker_, 'terminate');
renderer.disposeInternal();
expect(spyHelper.called).to.be(true);
expect(spyWorker.called).to.be(true);
});
});
});