From c234b4ea91e17cb02e4f7be34f8133c92acb0a0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa=20Aubert?= Date: Mon, 15 Oct 2018 08:30:51 +0200 Subject: [PATCH] Organize params --- test/acceptance/mvt.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/test/acceptance/mvt.js b/test/acceptance/mvt.js index 43bc3a71..dea4b5e9 100644 --- a/test/acceptance/mvt.js +++ b/test/acceptance/mvt.js @@ -196,7 +196,7 @@ return function () { }); }); - describe('overviews-mvt', function () { + describe('overviews', function () { function createMapConfig(layers, dataviews, analysis) { return { version: '1.8.0', @@ -221,8 +221,10 @@ return function () { ); const testClient = new TestClient(mapConfig); + const [ z, x, y ] = [ 0, 0, 0 ]; + const options = { format: 'mvt' }; - testClient.getTile(0, 0, 0, { format: 'mvt', layers: 0 }, function (err, res, mvt) { + testClient.getTile(z, x, y, options, function (err, res, mvt) { assert.ifError(err); const geojsonTile = JSON.parse(mvt.toGeoJSONSync(0)); @@ -242,7 +244,7 @@ return function () { }); }); - it('two layers, first should use overviews, second shouldn\'t', function (done) { + it('first layer should use overviews, second layer shouldn\'t', function (done) { const mapConfig = createMapConfig( [ { @@ -264,9 +266,11 @@ return function () { ] ); - var testClient = new TestClient(mapConfig); + const testClient = new TestClient(mapConfig); + const [ z, x, y ] = [ 0, 0, 0 ]; + const options = { format: 'mvt' }; - testClient.getTile(0, 0, 0, { format: 'mvt' }, function (err, res, mvt) { + testClient.getTile(z, x, y, options, function (err, res, mvt) { assert.ifError(err); const tileWithOverviews = JSON.parse(mvt.toGeoJSONSync(0));