fixing test race condition

This commit is contained in:
Yotam Mann 2015-04-05 10:36:39 -04:00
parent 2444e99b1f
commit 7e9b025418

View file

@ -41,9 +41,11 @@ function(chai, Player, Master, Oscillator, Recorder, Noise, core, PulseOscillato
expect(player.state).to.equal("started");
});
player.onended = function(){
expect(player.state).to.equal("stopped");
player.dispose();
done();
setTimeout(function(){
expect(player.state).to.equal("stopped");
player.dispose();
done();
}, 100);
};
player.toMaster();
});