osrm-backend/features/step_definitions/routing.js
2016-05-05 18:36:30 +02:00

16 lines
413 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);
});
};