Add response code to test result values
This commit is contained in:
parent
2f02384d22
commit
a5bfcd876f
@ -16,10 +16,13 @@ module.exports = function () {
|
|||||||
|
|
||||||
var headers = new Set(table.raw()[0]);
|
var headers = new Set(table.raw()[0]);
|
||||||
|
|
||||||
|
got.code = 'unknown';
|
||||||
if (res.body.length) {
|
if (res.body.length) {
|
||||||
json = JSON.parse(res.body);
|
json = JSON.parse(res.body);
|
||||||
|
got.code = json.code;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (headers.has('status')) {
|
if (headers.has('status')) {
|
||||||
got.status = json.status.toString();
|
got.status = json.status.toString();
|
||||||
}
|
}
|
||||||
@ -33,7 +36,7 @@ module.exports = function () {
|
|||||||
got['#'] = row['#'];
|
got['#'] = row['#'];
|
||||||
}
|
}
|
||||||
|
|
||||||
var subMatchings = [],
|
var subMatchings = [''],
|
||||||
turns = '',
|
turns = '',
|
||||||
route = '',
|
route = '',
|
||||||
duration = '',
|
duration = '',
|
||||||
|
@ -39,6 +39,8 @@ module.exports = function () {
|
|||||||
|
|
||||||
let json = JSON.parse(body);
|
let json = JSON.parse(body);
|
||||||
|
|
||||||
|
got.code = json.code;
|
||||||
|
|
||||||
let hasRoute = json.code === 'Ok';
|
let hasRoute = json.code === 'Ok';
|
||||||
|
|
||||||
if (hasRoute) {
|
if (hasRoute) {
|
||||||
|
Loading…
Reference in New Issue
Block a user