React Calculator - decimal problem #11 and #12

The tests won’t pass - it is like the test suite is unable to see the decimal point properly. Yet when I do the said tests manually, they evaluate fine even with the exact same numbers. Can anyone figure this one out?
My code:
(And by the way, I know the buttons are a mess - I will finish the CSS part later.)

Welcome, Matthew.

If you click on your AC button, it is not possible to enter decimal points anymore.

Hope this helps

1 Like

That’s it. Thanks for testing it and pointing out this - it helped me find the bug at once. Now it works.
What I learnt: when you are bashing your head against the wall for 5 hours thinking “this is just not possible”, the solution is often the simplest thing, such as not resetting a flag…

1 Like