Include vertexCount in the stats tests
This commit is contained in:
parent
b25540720c
commit
474d68687c
@ -92,7 +92,8 @@ describe('Create mapnik layergroup', function() {
|
||||
testClient.getLayergroup(function(err, layergroup) {
|
||||
assert.ok(!err);
|
||||
assert.equal(layergroup.metadata.layers[0].id, mapnikBasicLayerId(0));
|
||||
assert.equal(layergroup.metadata.layers[0].meta.stats[0].features, 5);
|
||||
assert.equal(layergroup.metadata.layers[0].meta.stats[0].featureCount, 5);
|
||||
assert.equal(layergroup.metadata.layers[0].meta.stats[0].vertexCount, 5);
|
||||
testClient.drain(done);
|
||||
});
|
||||
});
|
||||
@ -109,9 +110,11 @@ describe('Create mapnik layergroup', function() {
|
||||
testClient.getLayergroup(function(err, layergroup) {
|
||||
assert.ok(!err);
|
||||
assert.equal(layergroup.metadata.layers[0].id, mapnikBasicLayerId(0));
|
||||
assert.equal(layergroup.metadata.layers[0].meta.stats[0].features, 5);
|
||||
assert.equal(layergroup.metadata.layers[0].meta.stats[0].featureCount, 5);
|
||||
assert.equal(layergroup.metadata.layers[0].meta.stats[0].vertexCount, 5);
|
||||
assert.equal(layergroup.metadata.layers[1].id, mapnikBasicLayerId(1));
|
||||
assert.equal(layergroup.metadata.layers[1].meta.stats[0].features, 5);
|
||||
assert.equal(layergroup.metadata.layers[1].meta.stats[0].featureCount, 5);
|
||||
assert.equal(layergroup.metadata.layers[1].meta.stats[0].vertexCount, 5);
|
||||
testClient.drain(done);
|
||||
});
|
||||
});
|
||||
@ -129,11 +132,14 @@ describe('Create mapnik layergroup', function() {
|
||||
testClient.getLayergroup(function(err, layergroup) {
|
||||
assert.ok(!err);
|
||||
assert.equal(layergroup.metadata.layers[0].id, mapnikBasicLayerId(0));
|
||||
assert.equal(layergroup.metadata.layers[0].meta.stats[0].features, 5);
|
||||
assert.equal(layergroup.metadata.layers[0].meta.stats[0].featureCount, 5);
|
||||
assert.equal(layergroup.metadata.layers[0].meta.stats[0].vertexCount, 5);
|
||||
assert.equal(layergroup.metadata.layers[1].id, mapnikBasicLayerId(1));
|
||||
assert.equal(layergroup.metadata.layers[1].meta.stats[0].features, 5);
|
||||
assert.equal(layergroup.metadata.layers[1].meta.stats[0].featureCount, 5);
|
||||
assert.equal(layergroup.metadata.layers[1].meta.stats[0].vertexCount, 5);
|
||||
assert.equal(layergroup.metadata.layers[2].id, mapnikBasicLayerId(2));
|
||||
assert.equal(layergroup.metadata.layers[2].meta.stats[0].features, 5);
|
||||
assert.equal(layergroup.metadata.layers[2].meta.stats[0].featureCount, 5);
|
||||
assert.equal(layergroup.metadata.layers[2].meta.stats[0].vertexCount, 5);
|
||||
testClient.drain(done);
|
||||
});
|
||||
});
|
||||
@ -149,8 +155,10 @@ describe('Create mapnik layergroup', function() {
|
||||
testClient.getLayergroup(function(err, layergroup) {
|
||||
assert.ok(!err);
|
||||
assert.equal(layergroup.metadata.layers[0].id, mapnikBasicLayerId(0));
|
||||
assert.equal(layergroup.metadata.layers[0].meta.stats[0].features, 5);
|
||||
assert.equal(layergroup.metadata.layers[0].meta.stats[1].features, 5);
|
||||
assert.equal(layergroup.metadata.layers[0].meta.stats[0].featureCount, 5);
|
||||
assert.equal(layergroup.metadata.layers[0].meta.stats[0].vertexCount, 5);
|
||||
assert.equal(layergroup.metadata.layers[0].meta.stats[1].featureCount, 5);
|
||||
assert.equal(layergroup.metadata.layers[0].meta.stats[1].vertexCount, 5);
|
||||
testClient.drain(done);
|
||||
});
|
||||
});
|
||||
@ -167,11 +175,15 @@ describe('Create mapnik layergroup', function() {
|
||||
testClient.getLayergroup(function(err, layergroup) {
|
||||
assert.ok(!err);
|
||||
assert.equal(layergroup.metadata.layers[0].id, mapnikBasicLayerId(0));
|
||||
assert.equal(layergroup.metadata.layers[0].meta.stats[0].features, 5);
|
||||
assert.equal(layergroup.metadata.layers[0].meta.stats[1].features, 5);
|
||||
assert.equal(layergroup.metadata.layers[0].meta.stats[0].featureCount, 5);
|
||||
assert.equal(layergroup.metadata.layers[0].meta.stats[0].vertexCount, 5);
|
||||
assert.equal(layergroup.metadata.layers[0].meta.stats[1].featureCount, 5);
|
||||
assert.equal(layergroup.metadata.layers[0].meta.stats[1].vertexCount, 5);
|
||||
assert.equal(layergroup.metadata.layers[1].id, mapnikBasicLayerId(1));
|
||||
assert.equal(layergroup.metadata.layers[1].meta.stats[0].features, 5);
|
||||
assert.equal(layergroup.metadata.layers[1].meta.stats[1].features, 5);
|
||||
assert.equal(layergroup.metadata.layers[1].meta.stats[0].featureCount, 5);
|
||||
assert.equal(layergroup.metadata.layers[1].meta.stats[0].vertexCount, 5);
|
||||
assert.equal(layergroup.metadata.layers[1].meta.stats[1].featureCount, 5);
|
||||
assert.equal(layergroup.metadata.layers[1].meta.stats[1].vertexCount, 5);
|
||||
testClient.drain(done);
|
||||
});
|
||||
});
|
||||
@ -188,11 +200,14 @@ describe('Create mapnik layergroup', function() {
|
||||
testClient.getLayergroup(function(err, layergroup) {
|
||||
assert.ok(!err);
|
||||
assert.equal(layergroup.metadata.layers[0].id, mapnikBasicLayerId(0));
|
||||
assert.equal(layergroup.metadata.layers[0].meta.stats[0].features, 5);
|
||||
assert.equal(layergroup.metadata.layers[0].meta.stats[0].featureCount, 5);
|
||||
assert.equal(layergroup.metadata.layers[0].meta.stats[0].vertexCount, 5);
|
||||
assert.ok(!layergroup.metadata.layers[0].meta.stats[1]);
|
||||
assert.equal(layergroup.metadata.layers[1].id, mapnikBasicLayerId(1));
|
||||
assert.equal(layergroup.metadata.layers[1].meta.stats[0].features, 5);
|
||||
assert.equal(layergroup.metadata.layers[1].meta.stats[1].features, 5);
|
||||
assert.equal(layergroup.metadata.layers[1].meta.stats[0].featureCount, 5);
|
||||
assert.equal(layergroup.metadata.layers[1].meta.stats[0].vertexCount, 5);
|
||||
assert.equal(layergroup.metadata.layers[1].meta.stats[1].featureCount, 5);
|
||||
assert.equal(layergroup.metadata.layers[1].meta.stats[1].vertexCount, 5);
|
||||
assert.ok(!layergroup.metadata.layers[1].meta.stats[2]);
|
||||
assert.ok(!layergroup.metadata.layers[2]);
|
||||
testClient.drain(done);
|
||||
@ -212,7 +227,8 @@ describe('Create mapnik layergroup', function() {
|
||||
assert.ok(!err);
|
||||
assert.equal(layergroup.metadata.layers[0].id, mapnikBasicLayerId(0));
|
||||
assert.equal(layergroup.metadata.layers[0].type, 'mapnik');
|
||||
assert.equal(layergroup.metadata.layers[0].meta.stats[0].features, 5);
|
||||
assert.equal(layergroup.metadata.layers[0].meta.stats[0].featureCount, 5);
|
||||
assert.equal(layergroup.metadata.layers[0].meta.stats[0].vertexCount, 5);
|
||||
assert.equal(layergroup.metadata.layers[1].id, typeLayerId('http', 0));
|
||||
assert.equal(layergroup.metadata.layers[1].type, 'http');
|
||||
testClient.drain(done);
|
||||
@ -233,7 +249,8 @@ describe('Create mapnik layergroup', function() {
|
||||
assert.equal(layergroup.metadata.layers[0].id, typeLayerId('http', 0));
|
||||
assert.equal(layergroup.metadata.layers[0].type, 'http');
|
||||
assert.ok(!layergroup.metadata.layers[0].meta.cartocss);
|
||||
assert.equal(layergroup.metadata.layers[1].meta.stats[0].features, 5);
|
||||
assert.equal(layergroup.metadata.layers[1].meta.stats[0].featureCount, 5);
|
||||
assert.equal(layergroup.metadata.layers[1].meta.stats[0].vertexCount, 5);
|
||||
assert.equal(layergroup.metadata.layers[1].id, mapnikBasicLayerId(0));
|
||||
assert.equal(layergroup.metadata.layers[1].type, 'mapnik');
|
||||
assert.equal(layergroup.metadata.layers[1].meta.cartocss, cartocss);
|
||||
@ -253,7 +270,8 @@ describe('Create mapnik layergroup', function() {
|
||||
assert.ok(!err);
|
||||
assert.equal(layergroup.metadata.layers[0].id, mapnikBasicLayerId(0));
|
||||
// we don't care about stats here as is an aliased column
|
||||
assert.ok(layergroup.metadata.layers[0].meta.stats[0].hasOwnProperty('features'));
|
||||
assert.ok(layergroup.metadata.layers[0].meta.stats[0].hasOwnProperty('featureCount'));
|
||||
assert.ok(layergroup.metadata.layers[0].meta.stats[0].hasOwnProperty('vertexCount'));
|
||||
testClient.drain(done);
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user