mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-22 14:02:37 -05:00
Fix runtime scope and unit test
This commit is contained in:
parent
88b13e218d
commit
2a90e5868d
2 changed files with 3 additions and 2 deletions
|
@ -76,7 +76,7 @@ class Scratch3MusicBlocks {
|
|||
this._loadAllSounds();
|
||||
|
||||
this._onTargetCreated = this._onTargetCreated.bind(this);
|
||||
runtime.on('targetWasCreated', this._onTargetCreated);
|
||||
this.runtime.on('targetWasCreated', this._onTargetCreated);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,7 +2,8 @@ const test = require('tap').test;
|
|||
const Music = require('../../src/extensions/scratch3_music/index.js');
|
||||
|
||||
const fakeRuntime = {
|
||||
getTargetForStage: () => ({tempo: 60})
|
||||
getTargetForStage: () => ({tempo: 60}),
|
||||
on: () => {} // Stub out listener methods used in constructor.
|
||||
};
|
||||
|
||||
const blocks = new Music(fakeRuntime);
|
||||
|
|
Loading…
Reference in a new issue