test: Correct infinity string comparison in checkDisplay

Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
2026-03-14 17:04:51 -06:00
committed by Tanner
parent 255984e52f
commit e8a361210d
+6 -1
View File
@@ -119,7 +119,12 @@ function press(buttons) {
}
function checkDisplay(expected, message) {
const expectedStr = String(expected);
let expectedStr = String(expected);
if (expected === Infinity) {
expectedStr = 'INF';
} else if (expected === -Infinity) {
expectedStr = '-INF';
}
// attempt a numeric comparison for float-related issues
const expectedNum = parseFloat(expectedStr.replace(/,/g, ''));