diff --git a/dist/falcon/index.js b/dist/falcon/index.js index 655f90b..8d1ff36 100644 --- a/dist/falcon/index.js +++ b/dist/falcon/index.js @@ -45,7 +45,11 @@ const test = async (param1, param2, param3) => { tempResult = { logs: '' }; tempResult.input = input; try { - await cb(input); + if (cb[Symbol.toStringTag] === 'AsyncFunction') { + await cb(input); + } else { + cb(input); + } summary.testResults.push({ title, passed: true, diff --git a/falcon/index.js b/falcon/index.js index 655f90b..8d1ff36 100644 --- a/falcon/index.js +++ b/falcon/index.js @@ -45,7 +45,11 @@ const test = async (param1, param2, param3) => { tempResult = { logs: '' }; tempResult.input = input; try { - await cb(input); + if (cb[Symbol.toStringTag] === 'AsyncFunction') { + await cb(input); + } else { + cb(input); + } summary.testResults.push({ title, passed: true,