From 3f23dfb87b04579c58b596bf13729f954c0b368b Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Sun, 3 Jan 2016 11:20:03 -0700 Subject: [PATCH] Indentation --- .../spec/ol/control/zoomslidercontrol.test.js | 14 +-- test/spec/ol/coordinate.test.js | 17 ++- test/spec/ol/format/esrijsonformat.test.js | 113 ++++++++++-------- test/spec/ol/format/geojsonformat.test.js | 32 ++--- test/spec/ol/format/gmlformat.test.js | 3 +- .../ol/geom/flat/interpolateflatgeom.test.js | 26 ++-- .../flat/intersectsextentflatgeom.test.js | 3 +- test/spec/ol/geom/geometrycollection.test.js | 6 +- .../interaction/translateinteraction.test.js | 8 +- test/spec/ol/proj/proj.test.js | 15 +-- test/spec/ol/source/tilesource.test.js | 15 ++- 11 files changed, 131 insertions(+), 121 deletions(-) diff --git a/test/spec/ol/control/zoomslidercontrol.test.js b/test/spec/ol/control/zoomslidercontrol.test.js index b9e73a4062..d3cb78ada9 100644 --- a/test/spec/ol/control/zoomslidercontrol.test.js +++ b/test/spec/ol/control/zoomslidercontrol.test.js @@ -25,26 +25,22 @@ describe('ol.control.ZoomSlider', function() { describe('DOM creation', function() { it('creates the expected DOM elements', function() { var zoomSliderContainers = goog.dom.getElementsByClass( - 'ol-zoomslider', target), - zoomSliderContainer, - zoomSliderThumbs, - zoomSliderThumb, - hasUnselectableCls; + 'ol-zoomslider', target); expect(zoomSliderContainers.length).to.be(1); - zoomSliderContainer = zoomSliderContainers[0]; + var zoomSliderContainer = zoomSliderContainers[0]; expect(zoomSliderContainer instanceof HTMLDivElement).to.be(true); - hasUnselectableCls = goog.dom.classlist.contains(zoomSliderContainer, + var hasUnselectableCls = goog.dom.classlist.contains(zoomSliderContainer, 'ol-unselectable'); expect(hasUnselectableCls).to.be(true); - zoomSliderThumbs = goog.dom.getElementsByClass('ol-zoomslider-thumb', + var zoomSliderThumbs = goog.dom.getElementsByClass('ol-zoomslider-thumb', zoomSliderContainer); expect(zoomSliderThumbs.length).to.be(1); - zoomSliderThumb = zoomSliderThumbs[0]; + var zoomSliderThumb = zoomSliderThumbs[0]; expect(zoomSliderThumb instanceof HTMLButtonElement).to.be(true); hasUnselectableCls = goog.dom.classlist.contains(zoomSliderThumb, diff --git a/test/spec/ol/coordinate.test.js b/test/spec/ol/coordinate.test.js index dd0176b55a..7eb88841e8 100644 --- a/test/spec/ol/coordinate.test.js +++ b/test/spec/ol/coordinate.test.js @@ -3,8 +3,7 @@ goog.provide('ol.test.coordinate'); describe('ol.coordinate', function() { describe('#add', function() { - var coordinate, - delta; + var coordinate, delta; beforeEach(function() { coordinate = [50.73, 7.1]; @@ -31,13 +30,13 @@ describe('ol.coordinate', function() { }); describe('#equals', function() { - var cologne = [50.93333, 6.95], - bonn1 = [50.73, 7.1], - bonn2 = [50.73000, 7.10000]; + var cologne = [50.93333, 6.95]; + var bonn1 = [50.73, 7.1]; + var bonn2 = [50.73000, 7.10000]; it('compares correctly', function() { - var bonnEqualsBonn = ol.coordinate.equals(bonn1, bonn2), - bonnEqualsCologne = ol.coordinate.equals(bonn1, cologne); + var bonnEqualsBonn = ol.coordinate.equals(bonn1, bonn2); + var bonnEqualsCologne = ol.coordinate.equals(bonn1, cologne); expect(bonnEqualsBonn).to.be(true); expect(bonnEqualsCologne).to.be(false); }); @@ -61,9 +60,7 @@ describe('ol.coordinate', function() { }); describe('#createStringXY', function() { - var coordinate, - created, - formatted; + var coordinate, created, formatted; beforeEach(function() { coordinate = [6.6123, 46.7919]; created = null; diff --git a/test/spec/ol/format/esrijsonformat.test.js b/test/spec/ol/format/esrijsonformat.test.js index 41956080bd..0b24013817 100644 --- a/test/spec/ol/format/esrijsonformat.test.js +++ b/test/spec/ol/format/esrijsonformat.test.js @@ -270,8 +270,8 @@ describe('ol.format.EsriJSON', function() { describe('#readFeatures', function() { it('parses feature collection', function() { - var str = JSON.stringify(data), - array = format.readFeatures(str); + var str = JSON.stringify(data); + var array = format.readFeatures(str); expect(array.length).to.be(2); @@ -545,12 +545,12 @@ describe('ol.format.EsriJSON', function() { }); it('parses polygon', function() { - var outer = [[0, 0], [0, 10], [10, 10], [10, 0], [0, 0]], - inner1 = [[1, 1], [2, 1], [2, 2], [1, 2], [1, 1]], - inner2 = [[8, 8], [9, 8], [9, 9], [8, 9], [8, 8]], - str = JSON.stringify({ - rings: [outer, inner1, inner2] - }); + var outer = [[0, 0], [0, 10], [10, 10], [10, 0], [0, 0]]; + var inner1 = [[1, 1], [2, 1], [2, 2], [1, 2], [1, 1]]; + var inner2 = [[8, 8], [9, 8], [9, 9], [8, 9], [8, 8]]; + var str = JSON.stringify({ + rings: [outer, inner1, inner2] + }); var obj = format.readGeometry(str); expect(obj).to.be.a(ol.geom.Polygon); expect(obj.getLayout()).to.eql(ol.geom.GeometryLayout.XY); @@ -563,13 +563,13 @@ describe('ol.format.EsriJSON', function() { }); it('parses XYZ polygon', function() { - var outer = [[0, 0, 5], [0, 10, 5], [10, 10, 5], [10, 0, 5], [0, 0, 5]], - inner1 = [[1, 1, 3], [2, 1, 3], [2, 2, 3], [1, 2, 3], [1, 1, 3]], - inner2 = [[8, 8, 2], [9, 8, 2], [9, 9, 2], [8, 9, 2], [8, 8, 2]], - str = JSON.stringify({ - rings: [outer, inner1, inner2], - hasZ: true - }); + var outer = [[0, 0, 5], [0, 10, 5], [10, 10, 5], [10, 0, 5], [0, 0, 5]]; + var inner1 = [[1, 1, 3], [2, 1, 3], [2, 2, 3], [1, 2, 3], [1, 1, 3]]; + var inner2 = [[8, 8, 2], [9, 8, 2], [9, 9, 2], [8, 9, 2], [8, 8, 2]]; + var str = JSON.stringify({ + rings: [outer, inner1, inner2], + hasZ: true + }); var obj = format.readGeometry(str); expect(obj).to.be.a(ol.geom.Polygon); expect(obj.getLayout()).to.eql(ol.geom.GeometryLayout.XYZ); @@ -582,13 +582,13 @@ describe('ol.format.EsriJSON', function() { }); it('parses XYM polygon', function() { - var outer = [[0, 0, 5], [0, 10, 5], [10, 10, 5], [10, 0, 5], [0, 0, 5]], - inner1 = [[1, 1, 3], [2, 1, 3], [2, 2, 3], [1, 2, 3], [1, 1, 3]], - inner2 = [[8, 8, 2], [9, 8, 2], [9, 9, 2], [8, 9, 2], [8, 8, 2]], - str = JSON.stringify({ - rings: [outer, inner1, inner2], - hasM: true - }); + var outer = [[0, 0, 5], [0, 10, 5], [10, 10, 5], [10, 0, 5], [0, 0, 5]]; + var inner1 = [[1, 1, 3], [2, 1, 3], [2, 2, 3], [1, 2, 3], [1, 1, 3]]; + var inner2 = [[8, 8, 2], [9, 8, 2], [9, 9, 2], [8, 9, 2], [8, 8, 2]]; + var str = JSON.stringify({ + rings: [outer, inner1, inner2], + hasM: true + }); var obj = format.readGeometry(str); expect(obj).to.be.a(ol.geom.Polygon); expect(obj.getLayout()).to.eql(ol.geom.GeometryLayout.XYM); @@ -601,17 +601,23 @@ describe('ol.format.EsriJSON', function() { }); it('parses XYZM polygon', function() { - var outer = [[0, 0, 5, 1], [0, 10, 5, 1], [10, 10, 5, 1], - [10, 0, 5, 1], [0, 0, 5, 1]], - inner1 = [[1, 1, 3, 2], [2, 1, 3, 2], [2, 2, 3, 2], - [1, 2, 3, 2], [1, 1, 3, 2]], - inner2 = [[8, 8, 2, 1], [9, 8, 2, 1], [9, 9, 2, 1], - [8, 9, 2, 1], [8, 8, 2, 1]], - str = JSON.stringify({ - rings: [outer, inner1, inner2], - hasZ: true, - hasM: true - }); + var outer = [ + [0, 0, 5, 1], [0, 10, 5, 1], [10, 10, 5, 1], + [10, 0, 5, 1], [0, 0, 5, 1] + ]; + var inner1 = [ + [1, 1, 3, 2], [2, 1, 3, 2], [2, 2, 3, 2], + [1, 2, 3, 2], [1, 1, 3, 2] + ]; + var inner2 = [ + [8, 8, 2, 1], [9, 8, 2, 1], [9, 9, 2, 1], + [8, 9, 2, 1], [8, 8, 2, 1] + ]; + var str = JSON.stringify({ + rings: [outer, inner1, inner2], + hasZ: true, + hasM: true + }); var obj = format.readGeometry(str); expect(obj).to.be.a(ol.geom.Polygon); expect(obj.getLayout()).to.eql(ol.geom.GeometryLayout.XYZM); @@ -811,9 +817,9 @@ describe('ol.format.EsriJSON', function() { }); it('encodes polygon', function() { - var outer = [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]], - inner1 = [[1, 1], [2, 1], [2, 2], [1, 2], [1, 1]], - inner2 = [[8, 8], [9, 8], [9, 9], [8, 9], [8, 8]]; + var outer = [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]; + var inner1 = [[1, 1], [2, 1], [2, 2], [1, 2], [1, 1]]; + var inner2 = [[8, 8], [9, 8], [9, 9], [8, 9], [8, 8]]; var polygon = new ol.geom.Polygon([outer, inner1, inner2]); var esrijson = format.writeGeometry(polygon); expect(polygon.getCoordinates(false)).to.eql( @@ -821,9 +827,9 @@ describe('ol.format.EsriJSON', function() { }); it('encodes XYZ polygon', function() { - var outer = [[0, 0, 5], [0, 10, 5], [10, 10, 5], [10, 0, 5], [0, 0, 5]], - inner1 = [[1, 1, 3], [2, 1, 3], [2, 2, 3], [1, 2, 3], [1, 1, 3]], - inner2 = [[8, 8, 2], [9, 8, 2], [9, 9, 2], [8, 9, 2], [8, 8, 2]]; + var outer = [[0, 0, 5], [0, 10, 5], [10, 10, 5], [10, 0, 5], [0, 0, 5]]; + var inner1 = [[1, 1, 3], [2, 1, 3], [2, 2, 3], [1, 2, 3], [1, 1, 3]]; + var inner2 = [[8, 8, 2], [9, 8, 2], [9, 9, 2], [8, 9, 2], [8, 8, 2]]; var polygon = new ol.geom.Polygon([outer, inner1, inner2], ol.geom.GeometryLayout.XYZ); var esrijson = format.writeGeometry(polygon); @@ -832,9 +838,9 @@ describe('ol.format.EsriJSON', function() { }); it('encodes XYM polygon', function() { - var outer = [[0, 0, 5], [0, 10, 5], [10, 10, 5], [10, 0, 5], [0, 0, 5]], - inner1 = [[1, 1, 3], [2, 1, 3], [2, 2, 3], [1, 2, 3], [1, 1, 3]], - inner2 = [[8, 8, 2], [9, 8, 2], [9, 9, 2], [8, 9, 2], [8, 8, 2]]; + var outer = [[0, 0, 5], [0, 10, 5], [10, 10, 5], [10, 0, 5], [0, 0, 5]]; + var inner1 = [[1, 1, 3], [2, 1, 3], [2, 2, 3], [1, 2, 3], [1, 1, 3]]; + var inner2 = [[8, 8, 2], [9, 8, 2], [9, 9, 2], [8, 9, 2], [8, 8, 2]]; var polygon = new ol.geom.Polygon([outer, inner1, inner2], ol.geom.GeometryLayout.XYM); var esrijson = format.writeGeometry(polygon); @@ -843,12 +849,15 @@ describe('ol.format.EsriJSON', function() { }); it('encodes XYZM polygon', function() { - var outer = [[0, 0, 5, 1], [0, 10, 5, 2], [10, 10, 5, 1], - [10, 0, 5, 1], [0, 0, 5, 1]], - inner1 = [[1, 1, 3, 1], [2, 1, 3, 2], [2, 2, 3, 1], [1, 2, 3, 1], - [1, 1, 3, 1]], - inner2 = [[8, 8, 2, 1], [9, 8, 2, 2], [9, 9, 2, 1], [8, 9, 2, 1], - [8, 8, 2, 1]]; + var outer = [ + [0, 0, 5, 1], [0, 10, 5, 2], [10, 10, 5, 1], [10, 0, 5, 1], [0, 0, 5, 1] + ]; + var inner1 = [ + [1, 1, 3, 1], [2, 1, 3, 2], [2, 2, 3, 1], [1, 2, 3, 1], [1, 1, 3, 1] + ]; + var inner2 = [ + [8, 8, 2, 1], [9, 8, 2, 2], [9, 9, 2, 1], [8, 9, 2, 1], [8, 8, 2, 1] + ]; var polygon = new ol.geom.Polygon([outer, inner1, inner2], ol.geom.GeometryLayout.XYZM); var esrijson = format.writeGeometry(polygon); @@ -995,8 +1004,8 @@ describe('ol.format.EsriJSON', function() { describe('#writeFeatures', function() { it('encodes feature collection', function() { - var str = JSON.stringify(data), - array = format.readFeatures(str); + var str = JSON.stringify(data); + var array = format.readFeatures(str); var esrijson = format.writeFeaturesObject(array); var result = format.readFeatures(esrijson); expect(array.length).to.equal(result.length); @@ -1015,8 +1024,8 @@ describe('ol.format.EsriJSON', function() { }); it('transforms and encodes feature collection', function() { - var str = JSON.stringify(data), - array = format.readFeatures(str); + var str = JSON.stringify(data); + var array = format.readFeatures(str); var esrijson = format.writeFeatures(array, { featureProjection: 'EPSG:3857', dataProjection: 'EPSG:4326' diff --git a/test/spec/ol/format/geojsonformat.test.js b/test/spec/ol/format/geojsonformat.test.js index c36bbe2c91..6160a69b9e 100644 --- a/test/spec/ol/format/geojsonformat.test.js +++ b/test/spec/ol/format/geojsonformat.test.js @@ -231,8 +231,8 @@ describe('ol.format.GeoJSON', function() { describe('#readFeatures', function() { it('parses feature collection', function() { - var str = JSON.stringify(data), - array = format.readFeatures(str); + var str = JSON.stringify(data); + var array = format.readFeatures(str); expect(array.length).to.be(2); @@ -344,13 +344,13 @@ describe('ol.format.GeoJSON', function() { }); it('parses polygon', function() { - var outer = [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]], - inner1 = [[1, 1], [2, 1], [2, 2], [1, 2], [1, 1]], - inner2 = [[8, 8], [9, 8], [9, 9], [8, 9], [8, 8]], - str = JSON.stringify({ - type: 'Polygon', - coordinates: [outer, inner1, inner2] - }); + var outer = [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]; + var inner1 = [[1, 1], [2, 1], [2, 2], [1, 2], [1, 1]]; + var inner2 = [[8, 8], [9, 8], [9, 9], [8, 9], [8, 8]]; + var str = JSON.stringify({ + type: 'Polygon', + coordinates: [outer, inner1, inner2] + }); var obj = format.readGeometry(str); expect(obj).to.be.a(ol.geom.Polygon); @@ -495,8 +495,8 @@ describe('ol.format.GeoJSON', function() { describe('#writeFeatures', function() { it('encodes feature collection', function() { - var str = JSON.stringify(data), - array = format.readFeatures(str); + var str = JSON.stringify(data); + var array = format.readFeatures(str); var geojson = format.writeFeaturesObject(array); var result = format.readFeatures(geojson); expect(array.length).to.equal(result.length); @@ -515,8 +515,8 @@ describe('ol.format.GeoJSON', function() { }); it('transforms and encodes feature collection', function() { - var str = JSON.stringify(data), - array = format.readFeatures(str); + var str = JSON.stringify(data); + var array = format.readFeatures(str); var geojson = format.writeFeatures(array, { featureProjection: 'EPSG:3857' }); @@ -576,9 +576,9 @@ describe('ol.format.GeoJSON', function() { }); it('encodes polygon', function() { - var outer = [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]], - inner1 = [[1, 1], [2, 1], [2, 2], [1, 2], [1, 1]], - inner2 = [[8, 8], [9, 8], [9, 9], [8, 9], [8, 8]]; + var outer = [[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]; + var inner1 = [[1, 1], [2, 1], [2, 2], [1, 2], [1, 1]]; + var inner2 = [[8, 8], [9, 8], [9, 9], [8, 9], [8, 8]]; var polygon = new ol.geom.Polygon([outer, inner1, inner2]); var geojson = format.writeGeometry(polygon); expect(polygon.getCoordinates()).to.eql( diff --git a/test/spec/ol/format/gmlformat.test.js b/test/spec/ol/format/gmlformat.test.js index 40e1abae1d..7f1a0b7302 100644 --- a/test/spec/ol/format/gmlformat.test.js +++ b/test/spec/ol/format/gmlformat.test.js @@ -280,7 +280,8 @@ describe('ol.format.GML3', function() { describe('axis order', function() { it('can read and write a linestring geometry with ' + - 'correct axis order', function() { + 'correct axis order', + function() { var text = '' + diff --git a/test/spec/ol/geom/flat/interpolateflatgeom.test.js b/test/spec/ol/geom/flat/interpolateflatgeom.test.js index a9b205bc04..60a9aa7073 100644 --- a/test/spec/ol/geom/flat/interpolateflatgeom.test.js +++ b/test/spec/ol/geom/flat/interpolateflatgeom.test.js @@ -19,20 +19,22 @@ describe('ol.geom.flat.interpolate', function() { }); it('returns the expected value when the mid point is an existing ' + - 'coordinate', function() { - var flatCoordinates = [0, 1, 2, 3, 4, 5]; - var point = ol.geom.flat.interpolate.lineString( - flatCoordinates, 0, 6, 2, 0.5); - expect(point).to.eql([2, 3]); - }); + 'coordinate', + function() { + var flatCoordinates = [0, 1, 2, 3, 4, 5]; + var point = ol.geom.flat.interpolate.lineString( + flatCoordinates, 0, 6, 2, 0.5); + expect(point).to.eql([2, 3]); + }); it('returns the expected value when the midpoint falls halfway between ' + - 'two existing coordinates', function() { - var flatCoordinates = [0, 1, 2, 3, 4, 5, 6, 7]; - var point = ol.geom.flat.interpolate.lineString( - flatCoordinates, 0, 8, 2, 0.5); - expect(point).to.eql([3, 4]); - }); + 'two existing coordinates', + function() { + var flatCoordinates = [0, 1, 2, 3, 4, 5, 6, 7]; + var point = ol.geom.flat.interpolate.lineString( + flatCoordinates, 0, 8, 2, 0.5); + expect(point).to.eql([3, 4]); + }); it('returns the expected value when the coordinates are not evenly spaced', function() { diff --git a/test/spec/ol/geom/flat/intersectsextentflatgeom.test.js b/test/spec/ol/geom/flat/intersectsextentflatgeom.test.js index e929efc08e..a4f25e962e 100644 --- a/test/spec/ol/geom/flat/intersectsextentflatgeom.test.js +++ b/test/spec/ol/geom/flat/intersectsextentflatgeom.test.js @@ -70,7 +70,8 @@ describe('ol.geom.flat.intersectsextent', function() { }); }); describe('boundary does not intersect the extent and ring does not ' + - 'contain a corner of the extent', function() { + 'contain a corner of the extent', + function() { it('returns false', function() { var extent = [2.0, 0.5, 3, 1.5]; var r = ol.geom.flat.intersectsextent.linearRing( diff --git a/test/spec/ol/geom/geometrycollection.test.js b/test/spec/ol/geom/geometrycollection.test.js index 21a632a135..b2b3b45bdd 100644 --- a/test/spec/ol/geom/geometrycollection.test.js +++ b/test/spec/ol/geom/geometrycollection.test.js @@ -4,9 +4,9 @@ goog.require('ol.extent'); describe('ol.geom.GeometryCollection', function() { - var outer = [[0, 0], [0, 10], [10, 10], [10, 0], [0, 0]], - inner1 = [[1, 1], [2, 1], [2, 2], [1, 2], [1, 1]], - inner2 = [[8, 8], [9, 8], [9, 9], [8, 9], [8, 8]]; + var outer = [[0, 0], [0, 10], [10, 10], [10, 0], [0, 0]]; + var inner1 = [[1, 1], [2, 1], [2, 2], [1, 2], [1, 1]]; + var inner2 = [[8, 8], [9, 8], [9, 9], [8, 9], [8, 8]]; describe('constructor', function() { diff --git a/test/spec/ol/interaction/translateinteraction.test.js b/test/spec/ol/interaction/translateinteraction.test.js index 1d0504ce99..0c4b186a07 100644 --- a/test/spec/ol/interaction/translateinteraction.test.js +++ b/test/spec/ol/interaction/translateinteraction.test.js @@ -24,13 +24,13 @@ describe('ol.interaction.Translate', function() { source.addFeatures(features); var layer = new ol.layer.Vector({source: source}); map = new ol.Map({ - target: target, - layers: [layer], - view: new ol.View({ + target: target, + layers: [layer], + view: new ol.View({ projection: 'EPSG:4326', center: [0, 0], resolution: 1 - }) + }) }); map.once('postrender', function() { done(); diff --git a/test/spec/ol/proj/proj.test.js b/test/spec/ol/proj/proj.test.js index ac73c6735d..7006a877f0 100644 --- a/test/spec/ol/proj/proj.test.js +++ b/test/spec/ol/proj/proj.test.js @@ -49,13 +49,14 @@ describe('ol.proj', function() { }); it('gives that CRS:84, urn:ogc:def:crs:EPSG:6.6:4326, EPSG:4326 are ' + - 'equivalent', function() { - _testAllEquivalent([ - 'CRS:84', - 'urn:ogc:def:crs:EPSG:6.6:4326', - 'EPSG:4326' - ]); - }); + 'equivalent', + function() { + _testAllEquivalent([ + 'CRS:84', + 'urn:ogc:def:crs:EPSG:6.6:4326', + 'EPSG:4326' + ]); + }); it('requires code and units to be equal for projection evquivalence', function() { diff --git a/test/spec/ol/source/tilesource.test.js b/test/spec/ol/source/tilesource.test.js index e660f2f520..d15f54fbbb 100644 --- a/test/spec/ol/source/tilesource.test.js +++ b/test/spec/ol/source/tilesource.test.js @@ -71,8 +71,9 @@ describe('ol.source.Tile', function() { var zoom = 1; var range = new ol.TileRange(0, 1, 0, 1); - var covered = source.forEachLoadedTile(source.getProjection(), zoom, - range, function() { + var covered = source.forEachLoadedTile( + source.getProjection(), zoom, range, + function() { return true; }); expect(covered).to.be(true); @@ -90,8 +91,9 @@ describe('ol.source.Tile', function() { var zoom = 1; var range = new ol.TileRange(0, 1, 0, 1); - var covered = source.forEachLoadedTile(source.getProjection(), zoom, - range, function() { + var covered = source.forEachLoadedTile( + source.getProjection(), zoom, + range, function() { return true; }); expect(covered).to.be(false); @@ -109,8 +111,9 @@ describe('ol.source.Tile', function() { var zoom = 1; var range = new ol.TileRange(0, 1, 0, 1); - var covered = source.forEachLoadedTile(source.getProjection(), zoom, - range, function() { + var covered = source.forEachLoadedTile( + source.getProjection(), zoom, range, + function() { return false; }); expect(covered).to.be(false);