Skip to content

Commit 264c25b

Browse files
committed
Fix removing polyfill
1 parent e473cc6 commit 264c25b

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

test/index.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import * as node from '../index.js'
66

77
test.before(() => {
88
Object.defineProperty(global, 'crypto', {
9+
configurable: true,
910
value: {
1011
getRandomValues(array) {
1112
for (let i = 0; i < array.length; i++) {

test/react-native-polyfill.test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ test.before(() => {
99
}
1010

1111
Object.defineProperty(global, 'crypto', {
12+
configurable: true,
1213
value: {
1314
getRandomValues(array) {
1415
for (let i = 0; i < array.length; i++) {
@@ -22,6 +23,7 @@ test.before(() => {
2223

2324
test.after(() => {
2425
delete global.navigator
26+
delete global.crypto
2527
})
2628

2729
test('works with polyfill', () => {

0 commit comments

Comments
 (0)