diff options
Diffstat (limited to 'Userland/Libraries/LibJS/Tests/test-common.js')
-rw-r--r-- | Userland/Libraries/LibJS/Tests/test-common.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Userland/Libraries/LibJS/Tests/test-common.js b/Userland/Libraries/LibJS/Tests/test-common.js index 1f9e3af979..b02c9cb287 100644 --- a/Userland/Libraries/LibJS/Tests/test-common.js +++ b/Userland/Libraries/LibJS/Tests/test-common.js @@ -53,6 +53,9 @@ class ExpectationError extends Error { const valueToString = value => { try { + if (value === 0 && 1 / value < 0) { + return "-0"; + } return String(value); } catch { // e.g for objects without a prototype, the above throws. |