diff --git a/packages/bruno-js/src/bru.js b/packages/bruno-js/src/bru.js index 2d3edf04f..8dfc69486 100644 --- a/packages/bruno-js/src/bru.js +++ b/packages/bruno-js/src/bru.js @@ -100,6 +100,10 @@ class Bru { setNextRequest(nextRequest) { this.nextRequest = nextRequest; } + + sleep(ms) { + return new Promise((resolve) => setTimeout(resolve, ms)); + } } module.exports = Bru; diff --git a/packages/bruno-js/src/sandbox/quickjs/index.js b/packages/bruno-js/src/sandbox/quickjs/index.js index ea6e3faa1..66aed3352 100644 --- a/packages/bruno-js/src/sandbox/quickjs/index.js +++ b/packages/bruno-js/src/sandbox/quickjs/index.js @@ -93,14 +93,12 @@ const executeQuickJsVmAsync = async ({ script: externalScript, context: external fn.apply(); } await sleep(0); - console?.debug?.('quick-js:execution-start:'); try { ${externalScript} } catch(error) { console?.debug?.('quick-js:execution-end:with-error', error?.message); } - console?.debug?.('quick-js:execution-end:'); return 'done'; })() `;