From d311dccce8845219336e75ab953b78aac40641a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa=20Aubert?= Date: Thu, 14 Dec 2017 16:35:09 +0100 Subject: [PATCH] Add test to check tangram compatibility --- test/acceptance/aggregation.js | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/test/acceptance/aggregation.js b/test/acceptance/aggregation.js index d08a0ea0..46ea56b0 100644 --- a/test/acceptance/aggregation.js +++ b/test/acceptance/aggregation.js @@ -166,6 +166,33 @@ describe('aggregation', function () { }); }); + it('should return a NOT aggregated layergroup', function (done) { + this.mapConfig = createVectorMapConfig([ + { + type: 'cartodb', + options: { + sql: POINTS_SQL_1, + cartocss: '#layer { marker-width: [value]; }', + cartocss_version: '2.3.0' + } + } + ]); + this.testClient = new TestClient(this.mapConfig); + + this.testClient.getLayergroup((err, body) => { + if (err) { + return done(err); + } + + assert.equal(typeof body.metadata, 'object'); + assert.ok(Array.isArray(body.metadata.layers)); + + body.metadata.layers.forEach(layer => assert.equal(layer.meta.aggregation, undefined)); + + done(); + }); + }); + it('should return a layergroup with aggregation and cartocss compatible', function (done) { this.mapConfig = createVectorMapConfig([ {