Use namespaces for tests
With this commit test files provide namespaces (using goog.provide). This fixes the issue reported by @bartvde where goog objects cannot be used in Jasmine "describe" functions. It also frees us from having to add script tags for the test files in test/ol.html.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
goog.require('ol.TileUrlFunction');
|
||||
goog.require('ol.tilegrid.XYZ');
|
||||
goog.provide('ol.test.TileUrlFunction');
|
||||
|
||||
describe('ol.TileUrlFunction', function() {
|
||||
|
||||
@@ -51,7 +50,7 @@ describe('ol.TileUrlFunction', function() {
|
||||
|
||||
describe('createFromTileUrlFunctions', function() {
|
||||
it('creates expected URL', function() {
|
||||
tileUrl = ol.TileUrlFunction.createFromTileUrlFunctions([
|
||||
var tileUrl = ol.TileUrlFunction.createFromTileUrlFunctions([
|
||||
ol.TileUrlFunction.createFromTemplate('a'),
|
||||
ol.TileUrlFunction.createFromTemplate('b')
|
||||
]);
|
||||
@@ -83,3 +82,4 @@ describe('ol.TileUrlFunction', function() {
|
||||
|
||||
goog.require('ol.TileCoord');
|
||||
goog.require('ol.TileUrlFunction');
|
||||
goog.require('ol.tilegrid.XYZ');
|
||||
|
||||
Reference in New Issue
Block a user