increase test coverage
This commit is contained in:
parent
95b60b99eb
commit
c23461b7fe
@ -261,7 +261,7 @@ tables.forEach(function(annotation) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('table: ' + annotation + ' table in Monaco with invalid scale factor', function(assert) {
|
test('table: ' + annotation + ' table in Monaco with invalid scale factor', function(assert) {
|
||||||
assert.plan(1);
|
assert.plan(3);
|
||||||
var osrm = new OSRM({path: mld_data_path, algorithm: 'MLD'});
|
var osrm = new OSRM({path: mld_data_path, algorithm: 'MLD'});
|
||||||
var options = {
|
var options = {
|
||||||
coordinates: two_test_coordinates,
|
coordinates: two_test_coordinates,
|
||||||
@ -270,6 +270,13 @@ tables.forEach(function(annotation) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
assert.throws(()=>osrm.table(options, (err, res) => {}), /scale_factor must be > 0/, "should throw on invalid scale_factor value");
|
assert.throws(()=>osrm.table(options, (err, res) => {}), /scale_factor must be > 0/, "should throw on invalid scale_factor value");
|
||||||
|
|
||||||
|
options.scale_factor = '-1';
|
||||||
|
assert.throws(()=>osrm.table(options, (err, res) => {}), /scale_factor must be a number/, "should throw on invalid scale_factor value");
|
||||||
|
|
||||||
|
options.scale_factor = 0;
|
||||||
|
assert.throws(()=>osrm.table(options, (err, res) => {}), /scale_factor must be > 0/, "should throw on invalid scale_factor value");
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user