From db13f5e4f387d0eb6cbfdc987d393cdad1f7d91a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa=20Aubert?= Date: Mon, 15 Oct 2018 08:25:44 +0200 Subject: [PATCH] ES6 tweaks --- test/acceptance/mvt.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/test/acceptance/mvt.js b/test/acceptance/mvt.js index 4d447a6a..43bc3a71 100644 --- a/test/acceptance/mvt.js +++ b/test/acceptance/mvt.js @@ -207,7 +207,7 @@ return function () { } it('should use overviews to fetch mvt data', function (done) { - var mapConfig = createMapConfig( + const mapConfig = createMapConfig( [ { "type": "cartodb", @@ -220,15 +220,17 @@ return function () { ] ); - var testClient = new TestClient(mapConfig); + const testClient = new TestClient(mapConfig); - testClient.getTile(0, 0, 0, { format: 'mvt', layers: 0 }, function (err, res, MVT) { - var geojsonTile = JSON.parse(MVT.toGeoJSONSync(0)); - assert.ok(!err, err); + testClient.getTile(0, 0, 0, { format: 'mvt', layers: 0 }, function (err, res, mvt) { + assert.ifError(err); + + const geojsonTile = JSON.parse(mvt.toGeoJSONSync(0)); assert.ok(Array.isArray(geojsonTile.features)); assert.ok(geojsonTile.features.length > 0); - var feature = geojsonTile.features[0]; + + const feature = geojsonTile.features[0]; assert.ok(feature.properties.hasOwnProperty('_feature_count'), 'Missing _feature_count property'); assert.equal(feature.properties.cartodb_id, 1);