Calculator Project not Passing tests

Hello all,

I’ve been giving the calculator project a try, and it has not been passing some of the tests, for reasons I cannot understand.

For example:
Test 8 Fails but i can clearly see 123 when i press 123
Test 9 Fails but I can see 11.5 in the display
Similarly for the precision tests.

Code Pen:

If anyone could provide some input it would be greatly appreciated.

Here is a hint – Take another look at how this user story is implemented:

//     User Story #2: My calculator should contain 10 clickable
//     elements containing one number each from 0-9, with the following corresponding IDs:
//     id="zero", id="one", id="two", id="three", id="four", id="five", id="six", id="seven", id="eight", and id="nine".
Here is another hint if needed

The automated tests can’t “see” which numbers are printed on the buttons like you and I can (at least not these particular tests!). Instead, they use the ID of each button to know which one to click. Make sure the ID of each button accurately reflects the number value of the button.

Of course it was something that obvious :smiley: . Thanks for the help !

1 Like