From b4d19ab8ca7d2c9e4efab2afaa8ef9228c0ca990 Mon Sep 17 00:00:00 2001 From: Pragadesh-45 <54320162+Pragadesh-45@users.noreply.github.com> Date: Wed, 19 Nov 2025 12:09:18 +0530 Subject: [PATCH] fix: push event only if `exec` has content (#6121) --- .../src/postman/bruno-to-postman.js | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/packages/bruno-converters/src/postman/bruno-to-postman.js b/packages/bruno-converters/src/postman/bruno-to-postman.js index f9bd0f5c6..3ee944719 100644 --- a/packages/bruno-converters/src/postman/bruno-to-postman.js +++ b/packages/bruno-converters/src/postman/bruno-to-postman.js @@ -178,15 +178,18 @@ export const brunoToPostman = (collection) => { exec.push(...testsBlock.split('\n')); } - eventArray.push({ - listen: 'test', - script: { - type: 'text/javascript', - packages: {}, - requests: {}, - exec: exec - } - }); + // Only push the event if exec has content + if (exec.length > 0) { + eventArray.push({ + listen: 'test', + script: { + type: 'text/javascript', + packages: {}, + requests: {}, + exec: exec + } + }); + } } return eventArray; };