diff --git a/features/step_definitions/distance_matrix.js b/features/step_definitions/distance_matrix.js index 735847d56..f032f08e9 100644 --- a/features/step_definitions/distance_matrix.js +++ b/features/step_definitions/distance_matrix.js @@ -35,7 +35,8 @@ module.exports = function () { var actual = []; actual.push(table.headers); - this.reprocessAndLoadData(() => { + this.reprocessAndLoadData((e) => { + if (e) return callback(e); // compute matrix var params = this.queryParams; diff --git a/features/step_definitions/matching.js b/features/step_definitions/matching.js index 0d85f096c..e3dc4e6e3 100644 --- a/features/step_definitions/matching.js +++ b/features/step_definitions/matching.js @@ -6,7 +6,8 @@ module.exports = function () { this.When(/^I match I should get$/, (table, callback) => { var got; - this.reprocessAndLoadData(() => { + this.reprocessAndLoadData((e) => { + if (e) return callback(e); var testRow = (row, ri, cb) => { var afterRequest = (err, res) => { if (err) return cb(err); diff --git a/features/step_definitions/nearest.js b/features/step_definitions/nearest.js index 300eefed4..919cb857d 100644 --- a/features/step_definitions/nearest.js +++ b/features/step_definitions/nearest.js @@ -2,7 +2,8 @@ var util = require('util'); module.exports = function () { this.When(/^I request nearest I should get$/, (table, callback) => { - this.reprocessAndLoadData(() => { + this.reprocessAndLoadData((e) => { + if (e) return callback(e); var testRow = (row, ri, cb) => { var inNode = this.findNodeByName(row.in); if (!inNode) throw new Error(util.format('*** unknown in-node "%s"'), row.in); diff --git a/features/step_definitions/requests.js b/features/step_definitions/requests.js index 99adee63e..cb1188457 100644 --- a/features/step_definitions/requests.js +++ b/features/step_definitions/requests.js @@ -2,7 +2,8 @@ var assert = require('assert'); module.exports = function () { this.When(/^I request \/(.*)$/, (path, callback) => { - this.reprocessAndLoadData(() => { + this.reprocessAndLoadData((e) => { + if (e) return callback(e); this.requestPath(path, {}, (err, res, body) => { this.response = res; callback(err, res, body); diff --git a/features/step_definitions/trip.js b/features/step_definitions/trip.js index 35eb9accb..fe4ff892b 100644 --- a/features/step_definitions/trip.js +++ b/features/step_definitions/trip.js @@ -4,7 +4,8 @@ module.exports = function () { this.When(/^I plan a trip I should get$/, (table, callback) => { var got; - this.reprocessAndLoadData(() => { + this.reprocessAndLoadData((e) => { + if (e) return callback(e); var testRow = (row, ri, cb) => { var afterRequest = (err, res) => { if (err) return cb(err);