You’re using react 18. Try using react 17. Your code is currently failing all the clicking tests and react 18 and the testing bundle have compatibility problems on the tests involving clicks.
Testing manually, it also fails. Try this sequence (based on the tests) after a reload:
enter 1.2
clear
enter 0
clear
enter 0000
clear
enter 5.55
will display 555 not 5.55. This indicates a problem in your duplicate decimal logic or state.
My guess is that it will fail on react 17 as well, but at least you have something to debug.