license describe ( 'defineProperty' , function ( ) { it ( 'should not throw when defining length on an array' , function ( ) { const someArray = [ ] ; expect ( ( ) => Object . defineProperty ( someArray , 'length' , { value : 2 , writable : false } ) ) . not . toThrow ( ) ; } ) ; it ( 'should not throw error when try to defineProperty with a frozen desc' , function ( ) { const obj = { } ; const desc = Object . freeze ( { value : null , writable : true } ) ; Object . defineProperty ( obj , 'prop' , desc ) ; } ) ; it ( 'should not throw error when try to defineProperty with a frozen obj' , function ( ) { const obj = { } ; Object . freeze ( obj ) ; Object . defineProperty ( obj , 'prop' , { configurable : true , writable : true , value : 'value' } ) ; } ) ; } ) ;