Possible error in "Build a drum machine" for freeCodeCamp Frontend Development Libraries

The test says that the key should trigger the audio.
I originally had it triggering the button with .click() and thought that might be the issue and edited to playing the audio instead and so I kept adding more extraneous, sometimes useless, materials to test, making it unnecessarily complicated but still nothing.
The app runs properly and the keys do trigger the audio and text as expected but the test insists that the key does not trigger the audio as the only failure.
What am I doing wrong and why is this method not accepted?

If you are using React, you should not be referencing DOM elements with document.getElementById. That is not how React was meant to be used. The challenges in React do not show doing this for sure. You may need to research using Refs.

Log out the event.key inside the handler and run the test, notice anything?


Thanks for the pointer. It took me almost 24 hours to truly understand this though.
I might have wasted more time than necessary but it lead me to several new ideas, I like your approach to providing help, finding the answer instead of seeing it is satisfying.