Calculator project tests

Hi everyone! I’ve completed the calculator project of the frontend libraries section. It works all good but for some reason im not able to pass 8 tests of 16. I want to claim the certification and i was wondering if can without pass all the tests even if the app is working perfectly.

Here is my hosted project:

Can anyone check it to see if there is any error that you might know?

So the app is NOT working perfectly. Test number 7, for example, fails with this warning:

AssertionError: Element with with id="display" should show 0 : expected '0\n\n' to equal '0'

See the two newline (\n) characters in there? That’s the problem with that one. Haven’t checked the rest, but you will want to use a fine-tooth comb, the assertions are pretty rigid.

Yup. Most of your failing tests have to do with \n\n being appended to the display. Good luck.

Hi! So should i output a number instead of a string? Or should i remove the two newline?
If i click the AC button, i have a setState({input: '0', result: undefined}) I didn’t really understand the problem :frowning:

Problem solved :slight_smile: ! It seems the problem was caused by the paragraphs that i had inside display that caused new lines inside it

1 Like