[Mock] Nest MockAudioContext
state changes within Promise > resolve()
#27
Labels
🧪 Testing
Relating to testing of this code
At the moment, I have the
state
assignment +dispatchEvent()
outside of thePromise
for each of these mock methods:close()
suspend()
resume()
I was having some trouble getting the async testing to work correctly, so it was just easier to forgo awaiting the resolution. It would be nice to change this though, so that the expected behavior is a little more accurate.
One benefit of having the
state/event
occurring in theresolve()
is that I should be able to properly test thestate > suspending
withinEarwurm.test.ts
.The text was updated successfully, but these errors were encountered: