runapptests - Better logging of emit

pull/3399/head
Martin Boonk 2024-05-04 18:35:57 +02:00
parent 7289d3fd2b
commit 9b01f82324
1 changed files with 4 additions and 1 deletions

View File

@ -187,8 +187,11 @@ function runStep(step, subtest, test, state){
break;
case "emit" :
p = p.then(() => {
let parent = step.parent ? step.parent : "Bangle"
let parent = step.parent ? step.parent : "Bangle";
if (!step.paramsArray) step.paramsArray = [];
let args = JSON.stringify([step.event].concat(step.paramsArray));
console.log(`> Emit "${step.event}" on ${parent} with parameters ${JSON.stringify(step.paramsArray)}`);
emu.tx(`${parent}.emit.apply(${parent}, ${args})\n`);
});
break;