Merge pull request from paulkaplan/clear-pen-on-dispose

Clear the pen layer when runtime dispose happens.
This commit is contained in:
Paul Kaplan 2018-12-05 12:30:24 -05:00 committed by GitHub
commit ff3391718d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 0 deletions

View file

@ -239,3 +239,14 @@ test('setCompatibilityMode does not restart if it was not running', t => {
t.equal(started, false);
t.end();
});
test('Disposing the runtime emits an event', t => {
let disposed = false;
const rt = new Runtime();
rt.addListener('RUNTIME_DISPOSED', () => {
disposed = true;
});
rt.dispose();
t.equal(disposed, true);
t.end();
});