summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibJS/Tests/builtins/JSON/JSON.parse.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/Userland/Libraries/LibJS/Tests/builtins/JSON/JSON.parse.js b/Userland/Libraries/LibJS/Tests/builtins/JSON/JSON.parse.js
index 6cc501f51a..a05e579e2a 100644
--- a/Userland/Libraries/LibJS/Tests/builtins/JSON/JSON.parse.js
+++ b/Userland/Libraries/LibJS/Tests/builtins/JSON/JSON.parse.js
@@ -43,3 +43,10 @@ test("negative zero", () => {
expect(JSON.parse(-0)).toEqual(0);
});
+
+// The underlying parser resolves decimal numbers by storing the decimal portion in an integer
+// This test handles a regression where the decimal portion was only using a u32 vs. u64
+// and would fail to parse.
+test("long decimal parse", () => {
+ expect(JSON.parse("1644452550.6489999294281")).toEqual(1644452550.6489999294281);
+});