@@ -18,7 +18,8 @@ test('safe promise loophole', t => {
18
18
const p2 = Promise . resolve ( 'p2' ) ;
19
19
p2 . silly = 'silly own property' ;
20
20
t . throws ( ( ) => passStyleOf ( harden ( p2 ) ) , {
21
- message : '"[Promise]" - Must not have any own properties: ["silly"]' ,
21
+ message :
22
+ '"[Promise]" - Must not have any string-named own properties: ["silly"]' ,
22
23
} ) ;
23
24
t . is ( p2 [ toStringTag ] , 'Promise' ) ;
24
25
t . is ( `${ p2 } ` , '[object Promise]' ) ;
@@ -39,9 +40,7 @@ test('safe promise loophole', t => {
39
40
defineProperty ( p3 , toStringTag , {
40
41
value : 3 ,
41
42
} ) ;
42
- t . throws ( ( ) => passStyleOf ( harden ( p3 ) ) , {
43
- message : 'Own @@toStringTag value must be a string: 3' ,
44
- } ) ;
43
+ t . is ( passStyleOf ( harden ( p3 ) ) , 'promise' ) ;
45
44
}
46
45
47
46
{
@@ -50,10 +49,7 @@ test('safe promise loophole', t => {
50
49
value : 'Promise p4' ,
51
50
enumerable : true ,
52
51
} ) ;
53
- t . throws ( ( ) => passStyleOf ( harden ( p4 ) ) , {
54
- message :
55
- 'Own @@toStringTag must not be enumerable: {"configurable":false,"enumerable":true,"value":"Promise p4","writable":false}' ,
56
- } ) ;
52
+ t . is ( passStyleOf ( harden ( p4 ) ) , 'promise' ) ;
57
53
58
54
const p5 = Promise . resolve ( 'p5' ) ;
59
55
defineProperty ( p5 , toStringTag , {
0 commit comments