Calculator Project Test 13

Tell us what’s happening:
Hello, I’ve, been working on the Calculator front-end project for a couple of days now, and I’ve been stuck on 15/16 with test 13 not passing. I’m not sure exactly what’s wrong, and I’d really like some help understanding what I’m doing wrong.

Test 13 says “13. If 2 or more operators are entered consecutively, the operation performed should be the last operator entered (excluding the negative (-) sign.”

If it helps, I’ve been working mostly on lines 52-79 in the js editor.

Thank you in advance!

Your code so far
https://codepen.io/Busterfreeze/full/ExVLWRo

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36.

Challenge: Build a JavaScript Calculator

Link to the challenge:

Heres what the test is checking

The sequence "5 * - + 5" = should produce an output of "10" : expected '-25' to equal '10'

the last operator entered is +, so this should calculate 5+5
=10

I saw that when I was running the tests, although I’m not sure where I’m going wrong. It seems like what I have so far is able to see the multiple operators, but I’m not sure why my code isn’t adjusting the state to change it to make the last operator the one that gets used. I have a feeling it’s either my regular expression or it’s the way I’m trying to set the state but I can’t tell which one is wrong yet or if either/both of them are.