Fix flow api unit tests

This commit is contained in:
Nick O'Leary
2020-09-29 17:35:43 +01:00
parent ea45dde63a
commit 7a90fe5aec
2 changed files with 7 additions and 4 deletions

View File

@@ -255,7 +255,9 @@ describe("runtime-api/flows", function() {
var err = new Error();
// TODO: quirk of internal api - uses .code for .status
err.code = 404;
throw err;
var p = Promise.reject(err);
p.catch(()=>{});
return p;
} else if (id === "error") {
var err = new Error();
// TODO: quirk of internal api - uses .code for .status
@@ -311,7 +313,9 @@ describe("runtime-api/flows", function() {
var err = new Error();
// TODO: quirk of internal api - uses .code for .status
err.code = 404;
throw err;
var p = Promise.reject(err);
p.catch(()=>{});
return p;
} else if (flow === "error") {
var err = new Error();
// TODO: quirk of internal api - uses .code for .status