add an invalid scale_factor value to node tests

This commit is contained in:
Kajari Ghosh 2018-12-09 19:19:45 -05:00
parent 742bf216ff
commit 95b60b99eb

View File

@ -260,18 +260,16 @@ tables.forEach(function(annotation) {
});
});
// test('table: ' + annotation + ' table in Monaco with invalid scale factor', function(assert) {
// assert.plan(1);
// var osrm = new OSRM({path: mld_data_path, algorithm: 'MLD'});
// var options = {
// coordinates: two_test_coordinates,
// annotations: [annotation.slice(0,-1)],
// scale_factor: -1
// };
// osrm.table(options, function(err, response) {
// assert.notOk(osrm.table(options, function(err, response){}), "scale_factor must be > 0");
// });
// });
test('table: ' + annotation + ' table in Monaco with invalid scale factor', function(assert) {
assert.plan(1);
var osrm = new OSRM({path: mld_data_path, algorithm: 'MLD'});
var options = {
coordinates: two_test_coordinates,
annotations: [annotation.slice(0,-1)],
scale_factor: -1
};
assert.throws(()=>osrm.table(options, (err, res) => {}), /scale_factor must be > 0/, "should throw on invalid scale_factor value");
});
});