osrm-backend/features/step_definitions/routing.js

21 lines
544 B
JavaScript
Raw Normal View History

2016-03-04 15:11:05 -05:00
var d3 = require('d3-queue');
module.exports = function () {
this.When(/^I route I should get$/, this.WhenIRouteIShouldGet);
2016-05-05 12:36:30 -04:00
this.When(/^I route (\d+) times I should get$/, { timeout: 100 * this.TIMEOUT }, (n, table, callback) => {
2016-03-04 15:11:05 -05:00
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();
});
2016-03-04 15:11:05 -05:00
};