mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-07-26 06:01:11 -04:00
Emit a RUNTIME_STARTED event to track if the vm has been started
This commit is contained in:
parent
bb82c46f8a
commit
cc4751228e
4 changed files with 34 additions and 0 deletions
test/unit
|
@ -180,3 +180,14 @@ test('Cloud variable limit allows only 8 cloud variables', t => {
|
|||
t.end();
|
||||
|
||||
});
|
||||
|
||||
test('Starting the runtime emits an event', t => {
|
||||
let started = false;
|
||||
const rt = new Runtime();
|
||||
rt.addListener('RUNTIME_STARTED', () => {
|
||||
started = true;
|
||||
});
|
||||
rt.start();
|
||||
t.equal(started, true);
|
||||
t.end();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue