Populate executable targets when runtime.targets is populated so that scripts don't run before they are supposed to (e.g. before targets are done getting installed).

This commit is contained in:
Karishma Chadha 2019-01-11 14:52:34 -05:00
parent 522b5e1a8e
commit fbee37e915
9 changed files with 58 additions and 16 deletions

View file

@ -192,7 +192,9 @@ test('edge activated hat should trigger for both sprites when sprite is cloned',
val + Object.keys(target._edgeActivatedHatValues).length, 0);
t.equal(numTargetEdgeHats, 1);
vm.runtime.targets.push(vm.runtime.targets[1].makeClone());
const cloneTarget = vm.runtime.targets[1].makeClone();
vm.runtime.targets.push(cloneTarget);
vm.runtime.addExecutable(cloneTarget);
vm.runtime._step();
// Check that the runtime's _edgeActivatedHatValues object has two separate keys