diff --git a/package.json b/package.json index 312333d74a..2c18ad6fb0 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "install": "node tasks/install.js", "postinstall": "closure-util update", "start": "node tasks/serve.js", - "pretest": "eslint tasks", + "pretest": "eslint tasks test", "test": "node tasks/test.js", "debug-server": "node tasks/serve-lib.js" }, diff --git a/test/spec/ol/geom/flat/interpolateflatgeom.test.js b/test/spec/ol/geom/flat/interpolateflatgeom.test.js index 60a9aa7073..bbd5d91cbe 100644 --- a/test/spec/ol/geom/flat/interpolateflatgeom.test.js +++ b/test/spec/ol/geom/flat/interpolateflatgeom.test.js @@ -19,22 +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/proj/proj.test.js b/test/spec/ol/proj/proj.test.js index 7006a877f0..3298dacb32 100644 --- a/test/spec/ol/proj/proj.test.js +++ b/test/spec/ol/proj/proj.test.js @@ -49,14 +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/view.test.js b/test/spec/ol/view.test.js index 875a63fa92..c9f21c7fb2 100644 --- a/test/spec/ol/view.test.js +++ b/test/spec/ol/view.test.js @@ -402,60 +402,41 @@ describe('ol.View', function() { }); it('fits correctly to the geometry', function() { view.fit( - new ol.geom.LineString([[6000, 46000], [6000, 47100], [7000, 46000]]), - [200, 200], - { - padding: [100, 0, 0, 100], - constrainResolution: false - } - ); + new ol.geom.LineString([[6000, 46000], [6000, 47100], [7000, 46000]]), + [200, 200], + {padding: [100, 0, 0, 100], constrainResolution: false}); expect(view.getResolution()).to.be(11); expect(view.getCenter()[0]).to.be(5950); expect(view.getCenter()[1]).to.be(47100); view.fit( - new ol.geom.LineString([[6000, 46000], [6000, 47100], [7000, 46000]]), - [200, 200], - { - padding: [100, 0, 0, 100] - } - ); + new ol.geom.LineString([[6000, 46000], [6000, 47100], [7000, 46000]]), + [200, 200], + {padding: [100, 0, 0, 100]}); expect(view.getResolution()).to.be(20); expect(view.getCenter()[0]).to.be(5500); expect(view.getCenter()[1]).to.be(47550); view.fit( - new ol.geom.LineString([[6000, 46000], [6000, 47100], [7000, 46000]]), - [200, 200], - { - padding: [100, 0, 0, 100], - nearest: true - } - ); + new ol.geom.LineString([[6000, 46000], [6000, 47100], [7000, 46000]]), + [200, 200], + {padding: [100, 0, 0, 100], nearest: true}); expect(view.getResolution()).to.be(10); expect(view.getCenter()[0]).to.be(6000); expect(view.getCenter()[1]).to.be(47050); view.fit( - new ol.geom.Point([6000, 46000]), - [200, 200], - { - padding: [100, 0, 0, 100], - minResolution: 2 - } - ); + new ol.geom.Point([6000, 46000]), + [200, 200], + {padding: [100, 0, 0, 100], minResolution: 2}); expect(view.getResolution()).to.be(2); expect(view.getCenter()[0]).to.be(5900); expect(view.getCenter()[1]).to.be(46100); view.fit( - new ol.geom.Point([6000, 46000]), - [200, 200], - { - padding: [100, 0, 0, 100], - maxZoom: 6 - } - ); + new ol.geom.Point([6000, 46000]), + [200, 200], + {padding: [100, 0, 0, 100], maxZoom: 6}); expect(view.getResolution()).to.be(2); expect(view.getZoom()).to.be(6); expect(view.getCenter()[0]).to.be(5900); @@ -463,13 +444,9 @@ describe('ol.View', function() { view.setRotation(Math.PI / 4); view.fit( - new ol.geom.LineString([[6000, 46000], [6000, 47100], [7000, 46000]]), - [200, 200], - { - padding: [100, 0, 0, 100], - constrainResolution: false - } - ); + new ol.geom.LineString([[6000, 46000], [6000, 47100], [7000, 46000]]), + [200, 200], + {padding: [100, 0, 0, 100], constrainResolution: false}); expect(view.getResolution()).to.roughlyEqual(14.849242404917458, 1e-9); expect(view.getCenter()[0]).to.roughlyEqual(5200, 1e-9); expect(view.getCenter()[1]).to.roughlyEqual(46300, 1e-9);