There was an error while loading. Please reload this page.
1 parent f4537b6 commit 96114cbCopy full SHA for 96114cb
1 file changed
test/stringify.test.ts
@@ -57,14 +57,22 @@ a = 100
57
expect(stringify({ a: 100 })).toBe(expected)
58
})
59
60
-it('stringifies integers as floats', () => {
+it('stringifies integers as floats with numbersAsFloat', () => {
61
const expected = `
62
a = 100.0
63
`.trimStart()
64
65
expect(stringify({ a: 100 }, { numbersAsFloat: true })).toBe(expected)
66
67
68
+it('stringifies very large integers as floats', () => {
69
+ const expected = `
70
+a = 36028797018963968.0
71
+`.trimStart()
72
+
73
+ expect(stringify({ a: 2 ** 55 }, { numbersAsFloat: true })).toBe(expected)
74
+})
75
76
it('stringifies floats as floats', () => {
77
78
a = 100.146
0 commit comments