Fix unit test
This commit is contained in:
1 parent
9665b3ed25
commit
75ec76cd57
2 files changed
+3
-1
No files matched your search
@@ -68,6 +68,8 @@ class Scratch3MusicBlocks {
|
||||
* @return {Promise} - a promise which will resolve once the sound has loaded.
|
||||
*/
|
||||
_loadSound (fileName, index, bufferArray) {
|
||||
if (!this.runtime.storage) return;
|
||||
if (!this.runtime.audioEngine) return;
|
||||
return this.runtime.storage.load(this.runtime.storage.AssetType.Sound, fileName, 'mp3')
|
||||
.then(soundAsset =>
|
||||
this.runtime.audioEngine.audioContext.decodeAudioData(soundAsset.data.buffer)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const test = require('tap').test;
|
||||
const Music = require('../../src/blocks/scratch3_music');
|
||||
const Music = require('../../src/extensions/scratch3_music/index.js');
|
||||
let playedDrum;
|
||||
let playedInstrument;
|
||||
const runtime = {
|
||||
|
||||
Reference in new issue
Block a user