mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-16 04:11:29 +00:00
fix: push event only if exec has content (#6121)
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user