forked from extern/bruno
fix: fixed issue in bru cli where assertions was not being run
This commit is contained in:
parent
fbc6e7bff5
commit
dea95664b9
@ -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);
|
||||
|
@ -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", "")
|
||||
}
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user