feat: allow test to be asynchrone

This commit is contained in:
Lesage Yann
2023-09-29 08:55:26 +02:00
parent c9ec6902a5
commit 314e8c17d3
6 changed files with 70 additions and 10 deletions

View File

@@ -187,7 +187,7 @@ const runSingleRequest = async function (
const testFile = get(bruJson, 'request.tests');
if (testFile && testFile.length) {
const testRuntime = new TestRuntime();
const result = testRuntime.runTests(
const result = await testRuntime.runTests(
testFile,
request,
response,
@@ -292,7 +292,7 @@ const runSingleRequest = async function (
const testFile = get(bruJson, 'request.tests');
if (testFile && testFile.length) {
const testRuntime = new TestRuntime();
const result = testRuntime.runTests(
const result = await testRuntime.runTests(
testFile,
request,
err.response,