runapptests - Implement generic event emitter command

pull/3399/head
Martin Boonk 2024-05-04 10:46:59 +02:00
parent e8dc8b9be8
commit a84b6d1388
1 changed files with 4 additions and 2 deletions

View File

@ -183,9 +183,11 @@ function runStep(step, subtest, test, state){
emu.tx(`GB(${JSON.stringify(obj)})\n`);
});
break;
case "tap" :
case "emit" :
p = p.then(() => {
emu.tx(`Bangle.emit(...)\n`);
let parent = step.parent ? step.parent : "Bangle"
let args = JSON.stringify([step.event].concat(step.paramsArray));
emu.tx(`${parent}.emit.apply(${parent}, ${args})\n`);
});
break;
case "eval" :