chore(package): update eslint to version 3.9.1

https://greenkeeper.io/
This commit is contained in:
greenkeeperio-bot
2016-10-31 13:33:11 -06:00
committed by Frederic Junod
parent 5f5bc2ecdb
commit 71ebed07bf
13 changed files with 160 additions and 140 deletions

View File

@@ -307,10 +307,10 @@ describe('ol.format.EsriJSON', function() {
expect(first.getId()).to.be(6406);
var firstGeom = first.getGeometry();
expect(firstGeom).to.be.a(ol.geom.Polygon);
expect(ol.extent.equals(firstGeom.getExtent(),
[-10585772.743554419, 4712365.161160459,
-10579560.16462974, 4716567.373073828]))
.to.be(true);
expect(ol.extent.equals(firstGeom.getExtent(), [
-10585772.743554419, 4712365.161160459,
-10579560.16462974, 4716567.373073828
])).to.be(true);
var last = result[8];
expect(last).to.be.a(ol.Feature);
@@ -318,10 +318,10 @@ describe('ol.format.EsriJSON', function() {
expect(last.getId()).to.be(6030);
var lastGeom = last.getGeometry();
expect(lastGeom).to.be.a(ol.geom.Polygon);
expect(ol.extent.equals(lastGeom.getExtent(),
[-10555714.026858449, 4576511.565880965,
-10553671.199322715, 4578554.9934867555]))
.to.be(true);
expect(ol.extent.equals(lastGeom.getExtent(), [
-10555714.026858449, 4576511.565880965,
-10553671.199322715, 4578554.9934867555
])).to.be(true);
done();
});

View File

@@ -719,9 +719,9 @@ describe('ol.format.KML', function() {
it('can write XYZM Polygon geometries', function() {
var layout = 'XYZM';
var polygon = new ol.geom.Polygon(
[[[0, 0, 1, 1], [0, 2, 2, 1], [2, 2, 3, 1],
[2, 0, 4, 1], [0, 0, 5, 1]]], layout);
var polygon = new ol.geom.Polygon([
[[0, 0, 1, 1], [0, 2, 2, 1], [2, 2, 3, 1], [2, 0, 4, 1], [0, 0, 5, 1]]
], layout);
var features = [new ol.Feature(polygon)];
var node = format.writeFeaturesNode(features);
var text =
@@ -772,18 +772,20 @@ describe('ol.format.KML', function() {
expect(f).to.be.an(ol.Feature);
var g = f.getGeometry();
expect(g).to.be.an(ol.geom.Polygon);
expect(g.getCoordinates()).to.eql(
[[[0, 0, 1], [0, 5, 1], [5, 5, 2], [5, 0, 3]],
[[1, 1, 0], [1, 2, 0], [2, 2, 0], [2, 1, 0]],
[[3, 3, 0], [3, 4, 0], [4, 4, 0], [4, 3, 0]]]);
expect(g.getCoordinates()).to.eql([
[[0, 0, 1], [0, 5, 1], [5, 5, 2], [5, 0, 3]],
[[1, 1, 0], [1, 2, 0], [2, 2, 0], [2, 1, 0]],
[[3, 3, 0], [3, 4, 0], [4, 4, 0], [4, 3, 0]]
]);
});
it('can write complex Polygon geometries', function() {
var layout = 'XYZ';
var polygon = new ol.geom.Polygon(
[[[0, 0, 1], [0, 5, 1], [5, 5, 2], [5, 0, 3]],
[[1, 1, 0], [1, 2, 0], [2, 2, 0], [2, 1, 0]],
[[3, 3, 0], [3, 4, 0], [4, 4, 0], [4, 3, 0]]], layout);
var polygon = new ol.geom.Polygon([
[[0, 0, 1], [0, 5, 1], [5, 5, 2], [5, 0, 3]],
[[1, 1, 0], [1, 2, 0], [2, 2, 0], [2, 1, 0]],
[[3, 3, 0], [3, 4, 0], [4, 4, 0], [4, 3, 0]]
], layout);
var features = [new ol.Feature(polygon)];
var node = format.writeFeaturesNode(features);
var text =
@@ -966,9 +968,10 @@ describe('ol.format.KML', function() {
expect(f).to.be.an(ol.Feature);
var g = f.getGeometry();
expect(g).to.be.an(ol.geom.MultiPolygon);
expect(g.getCoordinates()).to.eql(
[[[[0, 0, 0], [0, 1, 0], [1, 1, 0], [1, 0, 0]]],
[[[3, 0, 0], [3, 1, 0], [4, 1, 0], [4, 0, 0]]]]);
expect(g.getCoordinates()).to.eql([
[[[0, 0, 0], [0, 1, 0], [1, 1, 0], [1, 0, 0]]],
[[[3, 0, 0], [3, 1, 0], [4, 1, 0], [4, 0, 0]]]
]);
expect(g.get('extrude')).to.be.an('array');
expect(g.get('extrude')).to.have.length(2);
expect(g.get('extrude')[0]).to.be(false);
@@ -981,9 +984,10 @@ describe('ol.format.KML', function() {
it('can write MultiPolygon geometries', function() {
var layout = 'XYZ';
var multiPolygon = new ol.geom.MultiPolygon(
[[[[0, 0, 0], [0, 1, 0], [1, 1, 0], [1, 0, 0]]],
[[[3, 0, 0], [3, 1, 0], [4, 1, 0], [4, 0, 0]]]], layout);
var multiPolygon = new ol.geom.MultiPolygon([
[[[0, 0, 0], [0, 1, 0], [1, 1, 0], [1, 0, 0]]],
[[[3, 0, 0], [3, 1, 0], [4, 1, 0], [4, 0, 0]]]
], layout);
var features = [new ol.Feature(multiPolygon)];
var node = format.writeFeaturesNode(features);
var text =

View File

@@ -17,20 +17,27 @@ describe('ol.format.Polyline', function() {
function resetTestingData() {
format = new ol.format.Polyline();
points = [[-120.20000, 38.50000],
[-120.95000, 40.70000],
[-126.45300, 43.25200]];
flatPoints = [-120.20000, 38.50000,
-120.95000, 40.70000,
-126.45300, 43.25200];
flippedFlatPoints = [38.50000, -120.20000,
40.70000, -120.95000,
43.25200, -126.45300];
points = [
[-120.20000, 38.50000],
[-120.95000, 40.70000],
[-126.45300, 43.25200]
];
flatPoints = [
-120.20000, 38.50000,
-120.95000, 40.70000,
-126.45300, 43.25200
];
flippedFlatPoints = [
38.50000, -120.20000,
40.70000, -120.95000,
43.25200, -126.45300
];
encodedFlatPoints = '_p~iF~ps|U_ulLnnqC_mqNvxq`@';
points3857 = [
ol.proj.transform([-120.20000, 38.50000], 'EPSG:4326', 'EPSG:3857'),
ol.proj.transform([-120.95000, 40.70000], 'EPSG:4326', 'EPSG:3857'),
ol.proj.transform([-126.45300, 43.25200], 'EPSG:4326', 'EPSG:3857')];
ol.proj.transform([-126.45300, 43.25200], 'EPSG:4326', 'EPSG:3857')
];
floats = [0.00, 0.15, -0.01, -0.16, 0.16, 0.01];
smallFloats = [0.00000, 0.00015, -0.00001, -0.00016, 0.00016, 0.00001];

View File

@@ -274,8 +274,9 @@ describe('ol.format.WKT', function() {
});
it('Empty geometries read / written correctly', function() {
var wkts = ['POINT', 'LINESTRING', 'POLYGON',
'MULTIPOINT', 'MULTILINESTRING', 'MULTIPOLYGON'];
var wkts = [
'POINT', 'LINESTRING', 'POLYGON', 'MULTIPOINT', 'MULTILINESTRING', 'MULTIPOLYGON'
];
for (var i = 0, ii = wkts.length; i < ii; ++i) {
var wkt = wkts[i] + ' EMPTY';
var geom = format.readGeometry(wkt);