From c23461b7fed07a97787f1ab916d4d06f2e732a17 Mon Sep 17 00:00:00 2001 From: Kajari Ghosh Date: Mon, 10 Dec 2018 10:38:05 -0500 Subject: [PATCH] increase test coverage --- test/nodejs/table.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/nodejs/table.js b/test/nodejs/table.js index 6a316bfae..5c567fff9 100644 --- a/test/nodejs/table.js +++ b/test/nodejs/table.js @@ -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, @@ -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"); + }); });