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]);
|
||||
|
||||
got.code = 'unknown';
|
||||
if (res.body.length) {
|
||||
json = JSON.parse(res.body);
|
||||
got.code = json.code;
|
||||
}
|
||||
|
||||
|
||||
if (headers.has('status')) {
|
||||
got.status = json.status.toString();
|
||||
}
|
||||
@ -33,7 +36,7 @@ module.exports = function () {
|
||||
got['#'] = row['#'];
|
||||
}
|
||||
|
||||
var subMatchings = [],
|
||||
var subMatchings = [''],
|
||||
turns = '',
|
||||
route = '',
|
||||
duration = '',
|
||||
|
@ -39,6 +39,8 @@ module.exports = function () {
|
||||
|
||||
let json = JSON.parse(body);
|
||||
|
||||
got.code = json.code;
|
||||
|
||||
let hasRoute = json.code === 'Ok';
|
||||
|
||||
if (hasRoute) {
|
||||
|
Loading…
Reference in New Issue
Block a user