File tree 2 files changed +19
-4
lines changed
2 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -631,13 +631,13 @@ common.expectsError(
631
631
}
632
632
) ;
633
633
common . expectsError (
634
- ( ) => assert ( typeof 123 === 'string' ) ,
634
+ ( ) => assert ( typeof 123n === 'string' ) ,
635
635
{
636
636
code : 'ERR_ASSERTION' ,
637
637
type : assert . AssertionError ,
638
638
generatedMessage : true ,
639
639
message : 'The expression evaluated to a falsy value:\n\n ' +
640
- "assert(typeof 123 === 'string')\n"
640
+ "assert(typeof 123n === 'string')\n"
641
641
}
642
642
) ;
643
643
Original file line number Diff line number Diff line change @@ -328,6 +328,21 @@ const errorTests = [
328
328
send : '1 }' ,
329
329
expect : '{ a: 1 }'
330
330
} ,
331
+ // Multiline class with private member.
332
+ {
333
+ send : 'class Foo { #private = true ' ,
334
+ expect : '... '
335
+ } ,
336
+ // Class field with bigint.
337
+ {
338
+ send : 'num = 123456789n' ,
339
+ expect : '... '
340
+ } ,
341
+ // Static class features.
342
+ {
343
+ send : 'static foo = "bar" }' ,
344
+ expect : 'undefined'
345
+ } ,
331
346
// Multiline anonymous function with comment
332
347
{
333
348
send : '(function() {' ,
@@ -338,12 +353,12 @@ const errorTests = [
338
353
expect : '... '
339
354
} ,
340
355
{
341
- send : 'return 1 ;' ,
356
+ send : 'return 1n ;' ,
342
357
expect : '... '
343
358
} ,
344
359
{
345
360
send : '})()' ,
346
- expect : '1 '
361
+ expect : '1n '
347
362
} ,
348
363
// Multiline function call
349
364
{
You can’t perform that action at this time.
0 commit comments