fix: fixed issue in bru cli where assertions was not being run

This commit is contained in:
Anoop M D 2023-03-23 21:35:41 +05:30
parent fbc6e7bff5
commit dea95664b9
3 changed files with 4 additions and 4 deletions

View File

@ -60,7 +60,7 @@ const runSingleRequest = async function (filename, bruJson, collectionPath, coll
// run assertions
let assertionResults = [];
const assertions = get(bruJson, 'request.assert');
const assertions = get(bruJson, 'request.assertions');
if(assertions && assertions.length) {
const assertRuntime = new AssertRuntime();
assertionResults = assertRuntime.runAssertions(assertions, request, response, envVariables, collectionVariables, collectionPath);

View File

@ -42,7 +42,7 @@ const bruToJson = (bru) => {
"headers": _.get(json, "headers", []),
"body": _.get(json, "body", {}),
"vars": _.get(json, "vars", []),
"assert": _.get(json, "assert", []),
"assertions": _.get(json, "assertions", []),
"script": _.get(json, "script", ""),
"tests": _.get(json, "tests", "")
}

View File

@ -14,8 +14,8 @@
},
"dependencies": {
"@usebruno/query": "0.1.0",
"atob": "^2.1.2",
"ajv": "^8.12.0",
"atob": "^2.1.2",
"btoa": "^1.2.1",
"crypto-js": "^4.1.1",
"json-query": "^2.2.2",
@ -24,4 +24,4 @@
"nanoid": "3.3.4",
"uuid": "^9.0.0"
}
}
}