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
|
// run assertions
|
||||||
let assertionResults = [];
|
let assertionResults = [];
|
||||||
const assertions = get(bruJson, 'request.assert');
|
const assertions = get(bruJson, 'request.assertions');
|
||||||
if(assertions && assertions.length) {
|
if(assertions && assertions.length) {
|
||||||
const assertRuntime = new AssertRuntime();
|
const assertRuntime = new AssertRuntime();
|
||||||
assertionResults = assertRuntime.runAssertions(assertions, request, response, envVariables, collectionVariables, collectionPath);
|
assertionResults = assertRuntime.runAssertions(assertions, request, response, envVariables, collectionVariables, collectionPath);
|
||||||
|
@ -42,7 +42,7 @@ const bruToJson = (bru) => {
|
|||||||
"headers": _.get(json, "headers", []),
|
"headers": _.get(json, "headers", []),
|
||||||
"body": _.get(json, "body", {}),
|
"body": _.get(json, "body", {}),
|
||||||
"vars": _.get(json, "vars", []),
|
"vars": _.get(json, "vars", []),
|
||||||
"assert": _.get(json, "assert", []),
|
"assertions": _.get(json, "assertions", []),
|
||||||
"script": _.get(json, "script", ""),
|
"script": _.get(json, "script", ""),
|
||||||
"tests": _.get(json, "tests", "")
|
"tests": _.get(json, "tests", "")
|
||||||
}
|
}
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@usebruno/query": "0.1.0",
|
"@usebruno/query": "0.1.0",
|
||||||
"atob": "^2.1.2",
|
|
||||||
"ajv": "^8.12.0",
|
"ajv": "^8.12.0",
|
||||||
|
"atob": "^2.1.2",
|
||||||
"btoa": "^1.2.1",
|
"btoa": "^1.2.1",
|
||||||
"crypto-js": "^4.1.1",
|
"crypto-js": "^4.1.1",
|
||||||
"json-query": "^2.2.2",
|
"json-query": "^2.2.2",
|
||||||
|
Loading…
Reference in New Issue
Block a user