@@ -305,33 +305,42 @@ describe('util', () => {
305
305
} )
306
306
} )
307
307
308
- it ( 'should parse a string' , ( ) => {
309
- assert . strictEqual ( parseString ( 'foo' ) , 'foo' )
310
- assert . strictEqual ( parseString ( '234foo' ) , '234foo' )
311
- assert . strictEqual ( parseString ( ' 234' ) , 234 )
312
- assert . strictEqual ( parseString ( '234 ' ) , 234 )
313
- assert . strictEqual ( parseString ( '2.3' ) , 2.3 )
314
- assert . strictEqual ( parseString ( 'null' ) , null )
315
- assert . strictEqual ( parseString ( 'true' ) , true )
316
- assert . strictEqual ( parseString ( 'false' ) , false )
317
- assert . strictEqual ( parseString ( '+1' ) , 1 )
318
- assert . strictEqual ( parseString ( '01' ) , '01' )
319
- assert . strictEqual ( parseString ( '001' ) , '001' )
320
- assert . strictEqual ( parseString ( '0.3' ) , 0.3 )
321
- assert . strictEqual ( parseString ( '0e3' ) , 0 )
322
- assert . strictEqual ( parseString ( ' ' ) , ' ' )
323
- assert . strictEqual ( parseString ( '' ) , '' )
324
- assert . strictEqual ( parseString ( '"foo"' ) , '"foo"' )
325
- assert . strictEqual ( parseString ( '"2"' ) , '"2"' )
326
- assert . strictEqual ( parseString ( '\'foo\'' ) , '\'foo\'' )
327
- assert . strictEqual ( parseString ( '0x1A' ) , '0x1A' )
328
- assert . strictEqual ( parseString ( '0x1F' ) , '0x1F' )
329
- assert . strictEqual ( parseString ( '0x1a' ) , '0x1a' )
330
- assert . strictEqual ( parseString ( '0b1101' ) , '0b1101' )
331
- assert . strictEqual ( parseString ( '0o3700' ) , '0o3700' )
332
- assert . strictEqual ( parseString ( '0X1a' ) , '0X1a' )
333
- assert . strictEqual ( parseString ( '0B1101' ) , '0B1101' )
334
- assert . strictEqual ( parseString ( '0O3700' ) , '0O3700' )
308
+ describe ( 'parseString' , ( ) => {
309
+ it ( 'should parse a string' , ( ) => {
310
+ assert . strictEqual ( parseString ( 'foo' ) , 'foo' )
311
+ assert . strictEqual ( parseString ( '234foo' ) , '234foo' )
312
+ assert . strictEqual ( parseString ( ' 234' ) , 234 )
313
+ assert . strictEqual ( parseString ( '234 ' ) , 234 )
314
+ assert . strictEqual ( parseString ( '2.3' ) , 2.3 )
315
+ assert . strictEqual ( parseString ( 'null' ) , null )
316
+ assert . strictEqual ( parseString ( 'true' ) , true )
317
+ assert . strictEqual ( parseString ( 'false' ) , false )
318
+ assert . strictEqual ( parseString ( '+1' ) , 1 )
319
+ assert . strictEqual ( parseString ( '01' ) , '01' )
320
+ assert . strictEqual ( parseString ( '001' ) , '001' )
321
+ assert . strictEqual ( parseString ( '0.3' ) , 0.3 )
322
+ assert . strictEqual ( parseString ( '0e3' ) , 0 )
323
+ assert . strictEqual ( parseString ( ' ' ) , ' ' )
324
+ assert . strictEqual ( parseString ( '' ) , '' )
325
+ assert . strictEqual ( parseString ( '"foo"' ) , '"foo"' )
326
+ assert . strictEqual ( parseString ( '"2"' ) , '"2"' )
327
+ assert . strictEqual ( parseString ( '\'foo\'' ) , '\'foo\'' )
328
+ assert . strictEqual ( parseString ( '0x1A' ) , '0x1A' )
329
+ assert . strictEqual ( parseString ( '0x1F' ) , '0x1F' )
330
+ assert . strictEqual ( parseString ( '0x1a' ) , '0x1a' )
331
+ assert . strictEqual ( parseString ( '0b1101' ) , '0b1101' )
332
+ assert . strictEqual ( parseString ( '0o3700' ) , '0o3700' )
333
+ assert . strictEqual ( parseString ( '0X1a' ) , '0X1a' )
334
+ assert . strictEqual ( parseString ( '0B1101' ) , '0B1101' )
335
+ assert . strictEqual ( parseString ( '0O3700' ) , '0O3700' )
336
+ assert . strictEqual ( parseString ( '7405242042266046865' ) , '7405242042266046865' )
337
+ assert . strictEqual ( parseString ( '9007199254740991' ) , 9007199254740991 )
338
+ assert . strictEqual ( parseString ( '9007199254740991' ) , 9007199254740991 )
339
+ assert . strictEqual ( parseString ( '-9007199254740991' ) , - 9007199254740991 )
340
+ assert . strictEqual ( parseString ( '1e25' ) , 1e25 )
341
+ assert . strictEqual ( parseString ( '1e308' ) , 1e308 )
342
+ assert . strictEqual ( parseString ( '1e309' ) , '1e309' )
343
+ } )
335
344
} )
336
345
337
346
it ( 'should find a unique name' , ( ) => {
0 commit comments