Skip to content

Commit

Permalink
Fix removing polyfill
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Dec 8, 2022
1 parent e473cc6 commit 264c25b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down
2 changes: 2 additions & 0 deletions test/react-native-polyfill.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ test.before(() => {
}

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

test.after(() => {
delete global.navigator
delete global.crypto
})

test('works with polyfill', () => {
Expand Down

0 comments on commit 264c25b

Please sign in to comment.