Emit a RUNTIME_STARTED event to track if the vm has been started

This commit is contained in:
Paul Kaplan 2018-11-27 11:37:01 -05:00
parent bb82c46f8a
commit cc4751228e
4 changed files with 34 additions and 0 deletions

View file

@ -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();
});