@@ -13,7 +13,8 @@ assert.strictEqual(test_object.readwriteValue, 1);
13
13
test_object . readwriteValue = 2 ;
14
14
assert . strictEqual ( test_object . readwriteValue , 2 ) ;
15
15
16
- assert . throws ( ( ) => { test_object . readonlyValue = 3 ; } , TypeError ) ;
16
+ assert . throws ( ( ) => { test_object . readonlyValue = 3 ; } ,
17
+ / ^ T y p e E r r o r : C a n n o t a s s i g n t o r e a d o n l y p r o p e r t y ' r e a d o n l y V a l u e ' o f o b j e c t ' # < M y O b j e c t > ' $ / ) ;
17
18
18
19
assert . ok ( test_object . hiddenValue ) ;
19
20
@@ -35,11 +36,13 @@ assert.ok(!propertyNames.includes('readonlyAccessor2'));
35
36
test_object . readwriteAccessor1 = 1 ;
36
37
assert . strictEqual ( test_object . readwriteAccessor1 , 1 ) ;
37
38
assert . strictEqual ( test_object . readonlyAccessor1 , 1 ) ;
38
- assert . throws ( ( ) => { test_object . readonlyAccessor1 = 3 ; } , TypeError ) ;
39
+ assert . throws ( ( ) => { test_object . readonlyAccessor1 = 3 ; } ,
40
+ / ^ T y p e E r r o r : C a n n o t a s s i g n t o r e a d o n l y p r o p e r t y ' r e a d o n l y A c c e s s o r 1 ' o f o b j e c t ' # < M y O b j e c t > ' $ / ) ;
39
41
test_object . readwriteAccessor2 = 2 ;
40
42
assert . strictEqual ( test_object . readwriteAccessor2 , 2 ) ;
41
43
assert . strictEqual ( test_object . readonlyAccessor2 , 2 ) ;
42
- assert . throws ( ( ) => { test_object . readonlyAccessor2 = 3 ; } , TypeError ) ;
44
+ assert . throws ( ( ) => { test_object . readonlyAccessor2 = 3 ; } ,
45
+ / ^ T y p e E r r o r : C a n n o t a s s i g n t o r e a d o n l y p r o p e r t y ' r e a d o n l y A c c e s s o r 2 ' o f o b j e c t ' # < M y O b j e c t > ' $ / ) ;
43
46
44
47
// validate that static properties are on the class as opposed
45
48
// to the instance
0 commit comments