mirror of
https://github.com/usebruno/bruno.git
synced 2024-12-22 23:02:40 +01:00
fix(#178): fixed await issue while running scripts
This commit is contained in:
parent
08495e7fb5
commit
b25d896dd6
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@usebruno/cli",
|
||||
"version": "0.6.1",
|
||||
"version": "0.6.2",
|
||||
"main": "src/index.js",
|
||||
"bin": {
|
||||
"bru": "./bin/bru.js"
|
||||
|
@ -36,7 +36,7 @@ const runSingleRequest = async function (filename, bruJson, collectionPath, coll
|
||||
const requestScriptFile = get(bruJson, 'request.script.req');
|
||||
if(requestScriptFile && requestScriptFile.length) {
|
||||
const scriptRuntime = new ScriptRuntime();
|
||||
scriptRuntime.runRequestScript(requestScriptFile, request, envVariables, collectionVariables, collectionPath);
|
||||
await scriptRuntime.runRequestScript(requestScriptFile, request, envVariables, collectionVariables, collectionPath);
|
||||
}
|
||||
|
||||
// interpolate variables inside request
|
||||
@ -63,7 +63,7 @@ const runSingleRequest = async function (filename, bruJson, collectionPath, coll
|
||||
const responseScriptFile = get(bruJson, 'request.script.res');
|
||||
if(responseScriptFile && responseScriptFile.length) {
|
||||
const scriptRuntime = new ScriptRuntime();
|
||||
scriptRuntime.runResponseScript(responseScriptFile, request, response, envVariables, collectionVariables, collectionPath);
|
||||
await scriptRuntime.runResponseScript(responseScriptFile, request, response, envVariables, collectionVariables, collectionPath);
|
||||
}
|
||||
|
||||
// run assertions
|
||||
@ -121,7 +121,7 @@ const runSingleRequest = async function (filename, bruJson, collectionPath, coll
|
||||
const responseScriptFile = get(bruJson, 'request.script.res');
|
||||
if(responseScriptFile && responseScriptFile.length) {
|
||||
const scriptRuntime = new ScriptRuntime();
|
||||
scriptRuntime.runResponseScript(responseScriptFile, request, err.response, envVariables, collectionVariables, collectionPath);
|
||||
await scriptRuntime.runResponseScript(responseScriptFile, request, err.response, envVariables, collectionVariables, collectionPath);
|
||||
}
|
||||
|
||||
// run assertions
|
||||
|
Loading…
Reference in New Issue
Block a user