I’m currently working on the Calculator app, I’m using React for this project.
Unfortunately I keep getting these errors for my code (I attached one screenshot)
Now while i keep getting these errors, when i check manually the code is working according to the tests and I don’t understand why i keep getting these
When I type 2 or more operators consecutively, the operation performed is the last operator entered (excluding the negative (-) sign), as asked. Same with the last error of 5 / 2 = / 2 = 1.5 which is exactly the result i get but I still get the error.
These are the user stories i don’t pass according to the tests :
- User Story #14: Pressing an operator immediately following
=
should start a new calculation that operates on the result of the previous evaluation. (The sequence “5 - 2 = / 2 =” should produce an output of “1.5” : expected ‘276’ to equal ‘1.5’) - If 2 or more operators are entered consecutively, the operation performed should be the last operator entered (excluding the negative (
-
) sign). For example, if5 + * 7 =
is entered, the result should be35
(i.e.5 * 7
); if5 * - 5 =
is entered, the result should be-25
(i.e.5 * (-5)
).
This is the link for my project in CodePen https://codepen.io/rita-gr/pen/wvNXVMW
I would really appreciate any help 
Challenge Information:
Front End Development Libraries Projects - Build a JavaScript Calculator