Declare variables before assignment

This commit is contained in:
Tim Schaub
2016-01-03 10:59:19 -07:00
parent f0fc4d4e73
commit 179b241aec
5 changed files with 8 additions and 6 deletions

View File

@@ -8,6 +8,7 @@ describe('ol.format.Polyline', function() {
var floats, smallFloats, encodedFloats;
var signedIntegers, encodedSignedIntegers;
var unsignedIntegers, encodedUnsignedIntegers;
var points3857;
function resetTestingData() {
format = new ol.format.Polyline();

View File

@@ -56,7 +56,7 @@ describe('ol.format.WMSGetFeatureInfo', function() {
});
it('read empty attributes', function() {
text =
var text =
'<?xml version="1.0" encoding="ISO-8859-1"?>' +
'<msGMLOutput ' +
' xmlns:gml="http://www.opengis.net/gml"' +
@@ -84,7 +84,7 @@ describe('ol.format.WMSGetFeatureInfo', function() {
});
it('read features from multiple layers', function() {
text =
var text =
'<?xml version="1.0" encoding="ISO-8859-1"?>' +
'<msGMLOutput ' +
' xmlns:gml="http://www.opengis.net/gml"' +
@@ -143,7 +143,7 @@ describe('ol.format.WMSGetFeatureInfo', function() {
});
it('read geoservers response', function() {
text =
var text =
'<?xml version="1.0" encoding="UTF-8"?>' +
'<wfs:FeatureCollection xmlns="http://www.opengis.net/wfs"' +
' xmlns:wfs="http://www.opengis.net/wfs"' +

View File

@@ -117,6 +117,8 @@ describe('ol.geom.GeometryCollection', function() {
describe('#intersectsExtent()', function() {
var point, line, poly, multi;
beforeEach(function() {
point = new ol.geom.Point([5, 20]);
line = new ol.geom.LineString([[10, 20], [30, 40]]);
@@ -136,7 +138,6 @@ describe('ol.geom.GeometryCollection', function() {
expect(multi.intersectsExtent([0, 0, 5, 5])).to.be(true);
});
it('returns false for non-matching extent within own extent', function() {
var extent = [0, 35, 5, 40];
expect(poly.intersectsExtent(extent)).to.be(false);

View File

@@ -160,7 +160,7 @@ describe('ol.interaction.Modify', function() {
});
map.addInteraction(modify);
events = trackEvents(first, modify);
var events = trackEvents(first, modify);
expect(first.getGeometry().getRevision()).to.equal(firstRevision);
expect(first.getGeometry().getCoordinates()[0]).to.have.length(5);

View File

@@ -20,7 +20,7 @@ function itNoPhantom() {
(typeof ImageData == 'function' ? describe : xdescribe)('ol.source.Raster',
function() {
var target, map, redSource, greenSource, blueSource;
var target, map, redSource, greenSource, blueSource, raster;
beforeEach(function() {
target = document.createElement('div');