We should be returning an error if any errors that occur during reprocessing.

This commit is contained in:
Daniel Patterson 2016-08-05 15:11:12 -07:00
parent 176c2244ad
commit 65def1a9e2
5 changed files with 10 additions and 5 deletions

View File

@ -35,7 +35,8 @@ module.exports = function () {
var actual = []; var actual = [];
actual.push(table.headers); actual.push(table.headers);
this.reprocessAndLoadData(() => { this.reprocessAndLoadData((e) => {
if (e) return callback(e);
// compute matrix // compute matrix
var params = this.queryParams; var params = this.queryParams;

View File

@ -6,7 +6,8 @@ module.exports = function () {
this.When(/^I match I should get$/, (table, callback) => { this.When(/^I match I should get$/, (table, callback) => {
var got; var got;
this.reprocessAndLoadData(() => { this.reprocessAndLoadData((e) => {
if (e) return callback(e);
var testRow = (row, ri, cb) => { var testRow = (row, ri, cb) => {
var afterRequest = (err, res) => { var afterRequest = (err, res) => {
if (err) return cb(err); if (err) return cb(err);

View File

@ -2,7 +2,8 @@ var util = require('util');
module.exports = function () { module.exports = function () {
this.When(/^I request nearest I should get$/, (table, callback) => { 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 testRow = (row, ri, cb) => {
var inNode = this.findNodeByName(row.in); var inNode = this.findNodeByName(row.in);
if (!inNode) throw new Error(util.format('*** unknown in-node "%s"'), row.in); if (!inNode) throw new Error(util.format('*** unknown in-node "%s"'), row.in);

View File

@ -2,7 +2,8 @@ var assert = require('assert');
module.exports = function () { module.exports = function () {
this.When(/^I request \/(.*)$/, (path, callback) => { this.When(/^I request \/(.*)$/, (path, callback) => {
this.reprocessAndLoadData(() => { this.reprocessAndLoadData((e) => {
if (e) return callback(e);
this.requestPath(path, {}, (err, res, body) => { this.requestPath(path, {}, (err, res, body) => {
this.response = res; this.response = res;
callback(err, res, body); callback(err, res, body);

View File

@ -4,7 +4,8 @@ module.exports = function () {
this.When(/^I plan a trip I should get$/, (table, callback) => { this.When(/^I plan a trip I should get$/, (table, callback) => {
var got; var got;
this.reprocessAndLoadData(() => { this.reprocessAndLoadData((e) => {
if (e) return callback(e);
var testRow = (row, ri, cb) => { var testRow = (row, ri, cb) => {
var afterRequest = (err, res) => { var afterRequest = (err, res) => {
if (err) return cb(err); if (err) return cb(err);