Tests: Adapt torque tests to work with PROJ 5.1

This commit is contained in:
Raul Marin
2018-07-11 12:33:02 +02:00
parent a0020804c9
commit 8dcab568bd
+11 -3
View File
@@ -19,13 +19,15 @@ describe('torque tiles at 0,0 point', function() {
what: 'tl',
x: 3,
y: 3,
expects: []
expects: [],
expects_fixed: [{"x__uint8":1,"y__uint8":0,"vals__uint8":[1],"dates__uint16":[0]}]
},
{
what: 'tr',
x: 4,
y: 3,
expects: []
expects: [],
expects_fixed: [{"x__uint8":0,"y__uint8":0,"vals__uint8":[1],"dates__uint16":[0]}]
},
{
what: 'bl',
@@ -74,7 +76,13 @@ describe('torque tiles at 0,0 point', function() {
};
testClient.getTorque(mapConfig, 0, 3, tile.x, tile.y, function(err, res) {
assert.deepEqual(JSON.parse(res.body), tile.expects);
assert.ok(!err, err);
try {
assert.deepEqual(JSON.parse(res.body), tile.expects);
} catch (ex) {
// With Proj 5.1 this bug has been fixed and the point appears in all tiles
assert.deepEqual(JSON.parse(res.body), tile.expects_fixed);
}
done();
});
});