diff --git a/features/options/routed/help.feature b/features/options/routed/help.feature index a581be3fe..bab61ef09 100644 --- a/features/options/routed/help.feature +++ b/features/options/routed/help.feature @@ -22,6 +22,7 @@ Feature: osrm-routed command line options: help And stdout should contain "--max-trip-size" And stdout should contain "--max-table-size" And stdout should contain "--max-matching-size" + And stdout should contain "--default-bearings-radius" And it should exit successfully Scenario: osrm-routed - Help, short @@ -42,6 +43,7 @@ Feature: osrm-routed command line options: help And stdout should contain "--max-trip-size" And stdout should contain "--max-table-size" And stdout should contain "--max-matching-size" + And stdout should contain "--default-bearings-radius" And it should exit successfully Scenario: osrm-routed - Help, long @@ -62,4 +64,5 @@ Feature: osrm-routed command line options: help And stdout should contain "--max-table-size" And stdout should contain "--max-table-size" And stdout should contain "--max-matching-size" + And stdout should contain "--default-bearings-radius" And it should exit successfully diff --git a/test/nodejs/index.js b/test/nodejs/index.js index e37fd019b..779505ec2 100644 --- a/test/nodejs/index.js +++ b/test/nodejs/index.js @@ -118,6 +118,12 @@ test('constructor: takes a default_bearing_radius argument', function(assert) { assert.ok(osrm); }); +test('constructor: throws if default_bearing_radius is not a number', function(assert) { + assert.plan(2); + assert.throws(function() { new OSRM({default_bearing_radius: 'abc'}); }, /default_bearing_radius must be an integral number/, 'Does not accept string'); + assert.ok(new OSRM({default_bearing_radius: 1}), 'Does accept number'); +}); + test('constructor: parses custom limits', function(assert) { assert.plan(1); var osrm = new OSRM({