Greetings,
I’ve coded the JS Calculator challenge in React. Manually it passes all the included tests however it only passes 8 out of 16 of the tests automatically.
I’m thinking that the issue might stem from the fact that the useState hook is inherently asynchronous while the tests expect synchronous behavior. However, useState is such a basic part of modern React - I’d be very surprised if that’s indeed the issue. I tried updating the HTML of the element with the id “clear” to “0” to test out if this is indeed the issue, however I failed the test again.
I’d appreciate any help with this issue. Here is the link to my codepen page:
Thanks in advance!
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:92.0) Gecko/20100101 Firefox/92.0
Challenge: Build a JavaScript Calculator
Link to the challenge: