File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -92,12 +92,20 @@ for (const [ getValue, _method ] of [
92
92
// Check boxed primitives.
93
93
console . log ( 'Testing' , 'isBoxedPrimitive' ) ;
94
94
[
95
- new Boolean ( ) ,
96
- new Number ( ) ,
97
- new String ( ) ,
98
- Object ( Symbol ( ) ) ,
99
- Object ( BigInt ( 0 ) )
100
- ] . forEach ( ( entry ) => assert ( types . isBoxedPrimitive ( entry ) ) ) ;
95
+ function ( ) { return new Boolean ( ) ; } ,
96
+ function ( ) { return new Number ( ) ; } ,
97
+ function ( ) { return new String ( ) ; } ,
98
+ function ( ) { return Object ( Symbol ( ) ) ; } ,
99
+ function ( ) { return Object ( BigInt ( 0 ) ) ; }
100
+ ] . forEach ( ( getEntry ) => {
101
+ let entry ;
102
+ try {
103
+ entry = getEntry ( ) ;
104
+ } catch ( e ) {
105
+ return ;
106
+ }
107
+ assert ( types . isBoxedPrimitive ( entry ) )
108
+ } ) ;
101
109
102
110
{
103
111
assert ( ! types . isUint8Array ( { [ Symbol . toStringTag ] : 'Uint8Array' } ) ) ;
You can’t perform that action at this time.
0 commit comments