We don’t really need it, but this is the test that is failing:
it(`If 2 or more operators are entered consecutively, the
operation performed should be the last operator entered (excluding
the negative (-) sign.`, async function () {
clickButtonsByIdWithDelay([_5, _x, _min, _5, _eq], CLICK_DELAY);
await timeout(DELAY);
assert.strictEqual(
getInputValue(document.getElementById('display')),
'-25',
'The sequence "5 * - 5" = should produce an output of "-25" '
);
clearDisplay();
clickButtonsByIdWithDelay([_5, _x, _min, _plus, _5, _eq], CLICK_DELAY);
await timeout(DELAY);
assert.strictEqual(
getInputValue(document.getElementById('display')),
'10',
'The sequence "5 * - + 5" = should produce an output of "10" '
);
clearDisplay();
clickButtonsByIdWithDelay([_5, _plus, _plus, _5, _eq], CLICK_DELAY);
await timeout(DELAY);
assert.strictEqual(
getInputValue(document.getElementById('display')),
'10',
'The sequence "5 + + 5" = should produce an output of "10" '
);
});
The error message tells us what we need to know, it is saying:
The sequence “5 * - + 5” = should produce an output of “10” : expected ‘-25’ to equal ‘10’
So, it is seeing -25 in there but is expecting 10.
When I enter that sequence of keys, that is what I see, too.
Does that makes sense?
Be sure to read the failing test messages - they are trying to give you clues.