Skip to content

Commit

Permalink
increase test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
ghoshkaj committed Dec 10, 2018
1 parent 58b8703 commit 8df15e5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test/nodejs/table.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ tables.forEach(function(annotation) {
});

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 options = {
coordinates: two_test_coordinates,
Expand All @@ -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");

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");

});
});

0 comments on commit 8df15e5

Please sign in to comment.