Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Mock] Nest MockAudioContext state changes within Promise > resolve() #27

Open
beefchimi opened this issue Mar 5, 2023 · 0 comments
Open
Labels
🧪 Testing Relating to testing of this code

Comments

@beefchimi
Copy link
Owner

beefchimi commented Mar 5, 2023

At the moment, I have the state assignment + dispatchEvent() outside of the Promise 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 the resolve() is that I should be able to properly test the state > suspending within Earwurm.test.ts.

@beefchimi beefchimi added the 🧪 Testing Relating to testing of this code label Mar 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧪 Testing Relating to testing of this code
Projects
None yet
Development

No branches or pull requests

1 participant