Closed philtrem closed 4 years ago
I made a pull request to fix this issue: https://github.com/freeCodeCamp/testable-projects-fcc/pull/892
edit: to fix this issue on my end, I forked my codepen and changed the code to account for both cases ie:
if (e.key === id || e.key === id.toLowerCase()) { ... }
Issue Description
Open the pen and run the tests to see what the issue is. The test fails while it shouldn't. You can verify this yourself.
if I match keypress with id (match with capital letter), the test passes ALTHOUGH the functionality is broken. Whereas if I implement it correctly by matching on the lowercase letter, the test doesn't pass.
Your Code / Link to Your Pen
https://codepen.io/philtrem/pen/vwXqJE