test: Correct infinity string comparison in checkDisplay
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
+6
-1
@@ -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, ''));
|
||||
|
||||
Reference in New Issue
Block a user