File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -247,19 +247,25 @@ Object.defineProperties(exports, {
247247 // The ecosystem needs those to exist for backwards compatibility.
248248 prng : {
249249 enumerable : false ,
250+ configurable : true ,
251+ writable : true ,
250252 value : pendingDeprecation ?
251253 deprecate ( randomBytes , 'crypto.prng is deprecated.' , 'DEP0115' ) :
252254 randomBytes
253255 } ,
254256 pseudoRandomBytes : {
255257 enumerable : false ,
258+ configurable : true ,
259+ writable : true ,
256260 value : pendingDeprecation ?
257261 deprecate ( randomBytes ,
258262 'crypto.pseudoRandomBytes is deprecated.' , 'DEP0115' ) :
259263 randomBytes
260264 } ,
261265 rng : {
262266 enumerable : false ,
267+ configurable : true ,
268+ writable : true ,
263269 value : pendingDeprecation ?
264270 deprecate ( randomBytes , 'crypto.rng is deprecated.' , 'DEP0115' ) :
265271 randomBytes
Original file line number Diff line number Diff line change @@ -306,3 +306,12 @@ assert.throws(
306306 }
307307 ) ;
308308} ) ;
309+
310+
311+ [ 'pseudoRandomBytes' , 'prng' , 'rng' ] . forEach ( ( f ) => {
312+ const desc = Object . getOwnPropertyDescriptor ( crypto , f ) ;
313+ assert . ok ( desc ) ;
314+ assert . strictEqual ( desc . configurable , true ) ;
315+ assert . strictEqual ( desc . writable , true ) ;
316+ assert . strictEqual ( desc . enumerable , false ) ;
317+ } ) ;
You can’t perform that action at this time.
0 commit comments