osrm-backend/features/step_definitions/routing.js
2019-09-23 11:38:33 +03:00

21 lines
544 B
JavaScript

var d3 = require('d3-queue');
module.exports = function () {
this.When(/^I route I should get$/, this.WhenIRouteIShouldGet);
this.When(/^I route (\d+) times I should get$/, { timeout: 100 * this.TIMEOUT }, (n, table, callback) => {
var q = d3.queue(1);
for (var i=0; i<n; i++) {
q.defer(this.WhenIRouteIShouldGet, table);
}
q.awaitAll(callback);
});
this.Given(/^skip waypoints$/, (callback) => {
this.queryParams['skip_waypoints'] = true;
callback();
});
};