freeCodeCamp: Drum Machine project's 6th test fails and throws an error
The 6th test of this project is failing every time and throws the error Uncaught (in promise) DOMException: The play() request was interrupted by a call to pause(). in the browser console, after some research I’ve found this thread on the forum, it seems that other people have faced it too.
Affected page
Your code
Here is the link to the pen that reproduces this issue: https://codepen.io/elidrissidev/pen/bGYbmgy
Expected behavior
The test should pass as the functionality is working when interacting with the app manually.
System
- Device: MacBook
- OS: macOS Catalina
- Browser: Google Chrome
- Version: 97.0.4692.99
Additional context
The issue seems to arise because the calls to play() and pause() are async and return a promise, but in the test they’re not handled properly.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16 (2 by maintainers)
@TaraBryn there is another repo for it
Thanks for reporting this.
The linked forum topic includes a great explanation of where the bug is likely to be occurring. A PR to solve this can be made on the testable project repo. I’ll go ahead and open this issue up for contribution.
An issue with the help wanted or first timers only label is open for contribution. The first comprehensive PR created will be reviewed and merged. We typically do not assign issues to anyone other than long-time contributors.
If you would like to contribute, and have not read the contributors docs, please do so here: https://contribute.freecodecamp.org/#/
If you have any issues with contributing, be sure to join us on the contributors channel, or on the contributors sub-forum