From 6cd578dca8c5c45946eb15796de3e3c91fa187c4 Mon Sep 17 00:00:00 2001 From: Andrey Sitnik Date: Thu, 8 Dec 2022 20:42:38 +0300 Subject: [PATCH] Fix property redefining --- test/async.test.js | 1 + test/index.test.js | 1 + 2 files changed, 2 insertions(+) diff --git a/test/async.test.js b/test/async.test.js index f0ba67e6..06b75dfe 100644 --- a/test/async.test.js +++ b/test/async.test.js @@ -7,6 +7,7 @@ import * as node from '../async/index.js' test.before(() => { Object.defineProperty(global, 'crypto', { + configurable: true, value: { getRandomValues(array) { for (let i = 0; i < array.length; i++) { diff --git a/test/index.test.js b/test/index.test.js index 10a0167e..30885cc9 100644 --- a/test/index.test.js +++ b/test/index.test.js @@ -6,6 +6,7 @@ import * as node from '../index.js' test.before(() => { Object.defineProperty(global, 'crypto', { + configurable: true, value: { getRandomValues(array) { for (let i = 0; i < array.length; i++) {