File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -535,9 +535,9 @@ function mustNotMutate(object) {
535535 assert . fail ( `Expected no side effects, got ${ property } deleted` ) ;
536536 } ,
537537 get ( target , prop , receiver ) {
538- const value = target [ prop ] ;
538+ const value = Reflect . get ( target , prop , receiver ) ;
539539 if ( value === null || typeof value !== 'object' ) {
540- return Reflect . get ( target , prop , receiver ) ;
540+ return value ;
541541 }
542542 return mustNotMutate ( value ) ;
543543 } ,
@@ -546,7 +546,8 @@ function mustNotMutate(object) {
546546 util . inspect ( target ) ) ;
547547 } ,
548548 set ( target , property , value , receiver ) {
549- assert . fail ( `Expected no side effects, got ${ value } assigned to ${ property } ` ) ;
549+ assert . fail ( `Expected no side effects, got ${ util . inspect ( value ) } ` +
550+ `assigned to ${ property } ` ) ;
550551 } ,
551552 setPrototypeOf ( target , prototype ) {
552553 assert . fail ( `Expected no side effects, got set prototype to ${ prototype } ` ) ;
You can’t perform that action at this time.
0 commit comments