Test with buffer-size 0

This commit is contained in:
Daniel García Aubert 2017-04-25 10:43:07 +02:00
parent 109c550187
commit 383a1a330a
2 changed files with 6 additions and 6 deletions

View File

@ -50,11 +50,11 @@ function createMapConfig (bufferSize) {
describe('buffer size per format', function () { describe('buffer size per format', function () {
var testCases = [ var testCases = [
{ {
desc: 'should get png tile using buffer-size 1', desc: 'should get png tile using buffer-size 0',
coords: { z: 7, x: 64, y: 48 }, coords: { z: 7, x: 64, y: 48 },
format: 'png', format: 'png',
fixturePath: './test/fixtures/buffer-size/tile-7.64.48-buffer-size-1.png', fixturePath: './test/fixtures/buffer-size/tile-7.64.48-buffer-size-0.png',
mapConfig: createMapConfig({ png: 1, 'grid.json': 1 }), mapConfig: createMapConfig({ png: 0, 'grid.json': 0 }),
assert: function (tile, callback) { assert: function (tile, callback) {
assert.imageIsSimilarToFile(tile, this.fixturePath, IMAGE_TOLERANCE_PER_MIL, callback); assert.imageIsSimilarToFile(tile, this.fixturePath, IMAGE_TOLERANCE_PER_MIL, callback);
} }
@ -70,11 +70,11 @@ describe('buffer size per format', function () {
} }
}, },
{ {
desc: 'should get mvt tile using buffer-size 1', desc: 'should get mvt tile using buffer-size 0',
coords: { z: 7, x: 64, y: 48 }, coords: { z: 7, x: 64, y: 48 },
format: 'mvt', format: 'mvt',
fixturePath: './test/fixtures/buffer-size/tile-7.64.48-buffer-size-1.png', fixturePath: './test/fixtures/buffer-size/tile-7.64.48-buffer-size-0.png',
mapConfig: createMapConfig({ mvt: 1 }), mapConfig: createMapConfig({ mvt: 0 }),
assert: function (tile, callback) { assert: function (tile, callback) {
var tileJSON = tile.toJSON(); var tileJSON = tile.toJSON();
var features = tileJSON[0].features; var features = tileJSON[0].features;

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB