This commit is contained in:
Siarhei Fedartsou 2023-03-23 21:08:15 +01:00
parent 032ceda07c
commit b5ef60a591
2 changed files with 6 additions and 26 deletions

View File

@ -515,7 +515,7 @@ jobs:
- name: Run all tests - name: Run all tests
if: ${{ matrix.NODE_PACKAGE_TESTS_ONLY != 'ON' && matrix.ENABLE_APPLE_SILICON != 'ON' }} if: ${{ matrix.NODE_PACKAGE_TESTS_ONLY != 'ON' && matrix.ENABLE_APPLE_SILICON != 'ON' }}
run: | run: |
ulimit -n 10240 # ulimit -n 10240
make -C test/data benchmark make -C test/data benchmark

View File

@ -145,34 +145,14 @@ test('constructor: throws on invalid custom limits', function(assert) {
test('constructor: takes a default_radius argument', function(assert) { test('constructor: takes a default_radius argument', function(assert) {
assert.plan(1); assert.plan(1);
assert.throws(function() { var osrm = new OSRM({path: monaco_mld_path, algorithm: 'MLD', max_alternatives: 1});
var osrm = new OSRM({ assert.ok(osrm);
path: monaco_mld_path,
algorithm: 'MLD',
max_locations_trip: 'unlimited',
max_locations_viaroute: true,
max_locations_distance_table: false,
max_locations_map_matching: 'a lot',
max_results_nearest: null,
max_alternatives: '10'
})
});
}); });
test('constructor: throws if default_radius is not a number', function(assert) { test('constructor: throws if default_radius is not a number', function(assert) {
assert.plan(1); assert.plan(2);
assert.throws(function() { assert.throws(function() { new OSRM({path: monaco_mld_path, algorithm: 'MLD', max_alternatives: 'abc'}); }, /default_radius must be an integral number/, 'Does not accept string');
var osrm = new OSRM({ assert.ok(new OSRM({max_alternatives: 1}), 'Does accept number');
path: monaco_mld_path,
algorithm: 'MLD',
max_locations_trip: 'unlimited',
max_locations_viaroute: true,
max_locations_distance_table: false,
max_locations_map_matching: 'a lot',
max_results_nearest: null,
max_alternatives: '10'
})
});
}); });
require('./route.js'); require('./route.js');