Additional tests, documentation and example

This commit is contained in:
Andreas Hocevar
2015-09-27 20:36:07 +02:00
parent 0e8e104a2d
commit 8e9b20db51
14 changed files with 560 additions and 21 deletions
@@ -0,0 +1,37 @@
goog.provide('ol.test.layer.VectorTile');
describe('ol.layer.VectorTile', function() {
describe('constructor (defaults)', function() {
var layer;
beforeEach(function() {
layer = new ol.layer.VectorTile({
source: new ol.source.VectorTile({})
});
});
afterEach(function() {
goog.dispose(layer);
});
it('creates an instance', function() {
expect(layer).to.be.a(ol.layer.VectorTile);
});
it('provides default preload', function() {
expect(layer.getPreload()).to.be(0);
});
it('provides default useInterimTilesOnError', function() {
expect(layer.getUseInterimTilesOnError()).to.be(true);
});
});
});
goog.require('goog.dispose');
goog.require('ol.layer.VectorTile');
goog.require('ol.source.VectorTile');