From 3799dd2574b56c1d8baaa67390dba561ff3f2948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa=20Aubert?= Date: Wed, 3 Jan 2018 11:14:20 +0100 Subject: [PATCH] Going red: fail when vector only map-config has a polygon layer --- test/acceptance/aggregation.js | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/test/acceptance/aggregation.js b/test/acceptance/aggregation.js index 30cfd9db..0e2f9672 100644 --- a/test/acceptance/aggregation.js +++ b/test/acceptance/aggregation.js @@ -1233,6 +1233,34 @@ describe('aggregation', function () { }); }); + it('should skip aggregation w/o failing when is Vector Only MapConfig and layer has polygons', function (done) { + this.mapConfig = createVectorMapConfig([ + { + type: 'cartodb', + options: { + sql: POLYGONS_SQL_1 + } + } + ]); + + this.testClient = new TestClient(this.mapConfig); + const options = { + format: 'mvt' + }; + + this.testClient.getTile(0, 0, 0, options, (err, res, tile) => { + if (err) { + return done(err); + } + + const tileJSON = tile.toJSON(); + + tileJSON[0].features.forEach(feature => assert.equal(typeof feature.properties.value, 'number')); + + done(); + }); + }); + }); }); });