Testing issue - Frontend Library Calculator Project

Hello hello,

I’m currently on the Frontend Library Certification project - JavaScript calculator (specs here).
My code - CodePen here ,is still in progress, however, I’m not sure of why some tests are failing.

If you click on “Run Tests”, you will see that some errors refer to the element (here, a <div>) with id='display'. This should display the result of the calculator computations. And in fact, it does exactly that: it displays this.state.result, which is where I store the result of the computation in the Calculator component. Nonetheless, the tests won’t pass.

Initially, this.state.result was stored in another <div> inside the <div id='container'>. I tried removing this nesting, but alas, to no avail.

I don’t understand where I’m going wrong?

Any help would be very much appreciated! :pray:

Thanks in advance :slight_smile:

Giulia

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.