Add more tests
This commit is contained in:
parent
25841dc91c
commit
da5a673cfa
@ -22,6 +22,7 @@ Feature: osrm-routed command line options: help
|
|||||||
And stdout should contain "--max-trip-size"
|
And stdout should contain "--max-trip-size"
|
||||||
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 "--max-matching-size"
|
||||||
|
And stdout should contain "--default-bearings-radius"
|
||||||
And it should exit successfully
|
And it should exit successfully
|
||||||
|
|
||||||
Scenario: osrm-routed - Help, short
|
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-trip-size"
|
||||||
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 "--max-matching-size"
|
||||||
|
And stdout should contain "--default-bearings-radius"
|
||||||
And it should exit successfully
|
And it should exit successfully
|
||||||
|
|
||||||
Scenario: osrm-routed - Help, long
|
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-table-size"
|
And stdout should contain "--max-table-size"
|
||||||
And stdout should contain "--max-matching-size"
|
And stdout should contain "--max-matching-size"
|
||||||
|
And stdout should contain "--default-bearings-radius"
|
||||||
And it should exit successfully
|
And it should exit successfully
|
||||||
|
|||||||
@ -118,6 +118,12 @@ test('constructor: takes a default_bearing_radius argument', function(assert) {
|
|||||||
assert.ok(osrm);
|
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) {
|
test('constructor: parses custom limits', function(assert) {
|
||||||
assert.plan(1);
|
assert.plan(1);
|
||||||
var osrm = new OSRM({
|
var osrm = new OSRM({
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user