@@ -101,37 +101,45 @@ const test7Obj = [
101
101
"90071992547409981111.5n" ,
102
102
] ;
103
103
104
+ const test8Obj = { uid : BigInt ( "1308537228663099396" ) } ;
105
+ const test8JSON = '{\n "uid": 1308537228663099396\n}' ;
106
+
104
107
assert . deepStrictEqual ( JSONParse ( test1JSON ) , test1Obj ) ;
105
- console . log ( "1 test parsing passed" ) ;
108
+ console . log ( "1 test passed" ) ;
106
109
assert . deepStrictEqual ( JSONStringify ( JSONParse ( test1JSON ) ) , test1JSON ) ;
107
110
console . log ( "1 test round-trip passed" ) ;
108
111
109
112
assert . deepStrictEqual ( JSONParse ( test2JSON ) , test2Obj ) ;
110
- console . log ( "2 test parsing passed" ) ;
113
+ console . log ( "2 test passed" ) ;
111
114
assert . deepStrictEqual ( JSONStringify ( JSONParse ( test2JSON ) ) , test2TersedJSON ) ;
112
115
console . log ( "2 test round-trip passed" ) ;
113
116
114
117
assert . deepStrictEqual ( JSONParse ( test3JSON ) , test3Obj ) ;
115
- console . log ( "3 test parsing passed" ) ;
118
+ console . log ( "3 test passed" ) ;
116
119
assert . deepStrictEqual ( JSONStringify ( JSONParse ( test3JSON ) ) , test3JSON ) ;
117
120
console . log ( "3 test round-trip passed" ) ;
118
121
119
122
assert . deepStrictEqual ( JSONParse ( test4JSON ) , test4Obj ) ;
120
- console . log ( "4 test parsing passed" ) ;
123
+ console . log ( "4 test passed" ) ;
121
124
assert . deepStrictEqual ( JSONStringify ( JSONParse ( test4JSON ) ) , test4JSON ) ;
122
125
console . log ( "4 test round-trip passed" ) ;
123
126
124
127
assert . deepStrictEqual ( JSONParse ( test5JSON ) , test5Obj ) ;
125
- console . log ( "5 test parsing passed" ) ;
128
+ console . log ( "5 test passed" ) ;
126
129
assert . deepStrictEqual ( JSONStringify ( JSONParse ( test5JSON ) ) , test5JSON ) ;
127
130
console . log ( "5 test round-trip passed" ) ;
128
131
129
132
assert . deepStrictEqual ( JSONParse ( test6JSON ) , test6Obj ) ;
130
- console . log ( "6 test parsing passed" ) ;
133
+ console . log ( "6 test passed" ) ;
131
134
assert . deepStrictEqual ( JSONStringify ( JSONParse ( test6JSON ) ) , test6JSON ) ;
132
135
console . log ( "6 test round-trip passed" ) ;
133
136
134
137
assert . deepStrictEqual ( JSONParse ( test7JSON ) , test7Obj ) ;
135
- console . log ( "7 test parsing passed" ) ;
138
+ console . log ( "7 test passed" ) ;
136
139
assert . deepStrictEqual ( JSONStringify ( JSONParse ( test7JSON ) ) , test7JSON ) ;
137
140
console . log ( "7 test round-trip passed" ) ;
141
+
142
+ assert . deepStrictEqual ( JSONStringify ( test8Obj , null , 2 ) , test8JSON ) ;
143
+ console . log ( "8 test passed" ) ;
144
+ assert . deepStrictEqual ( JSONParse ( JSONStringify ( test8Obj , null , 2 ) ) , test8Obj ) ;
145
+ console . log ( "8 test round-trip passed" ) ;
0 commit comments