diff --git a/.github/workflows/osrm-backend.yml b/.github/workflows/osrm-backend.yml index 2152b3826..ea64d1170 100644 --- a/.github/workflows/osrm-backend.yml +++ b/.github/workflows/osrm-backend.yml @@ -515,7 +515,7 @@ jobs: - name: Run all tests if: ${{ matrix.NODE_PACKAGE_TESTS_ONLY != 'ON' && matrix.ENABLE_APPLE_SILICON != 'ON' }} run: | - ulimit -n 10240 + # ulimit -n 10240 make -C test/data benchmark diff --git a/test/nodejs/index.js b/test/nodejs/index.js index 9a1f9da67..1e31dacd9 100644 --- a/test/nodejs/index.js +++ b/test/nodejs/index.js @@ -145,34 +145,14 @@ test('constructor: throws on invalid custom limits', function(assert) { test('constructor: takes a default_radius argument', function(assert) { assert.plan(1); - assert.throws(function() { - var osrm = new 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' - }) - }); + var osrm = new OSRM({path: monaco_mld_path, algorithm: 'MLD', max_alternatives: 1}); + assert.ok(osrm); }); test('constructor: throws if default_radius is not a number', function(assert) { - assert.plan(1); - assert.throws(function() { - var osrm = new 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' - }) - }); + assert.plan(2); + 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'); + assert.ok(new OSRM({max_alternatives: 1}), 'Does accept number'); }); require('./route.js');