Skip to content
Myr

Fix removing polyfill

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Andrey Sitnik · committed by Andrey Sitnik · parent e473cc6 · Browse files · 2 files+3 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+3 added−0 removed

  • tests:+3 added−0 removed

2 files+3 added−0 removed

modified:test/index.test.js+1 added
modified:test/react-native-polyfill.test.js+2 added
7 unmodified lines
8 product: 'ReactNative'9 }1011 Object.defineProperty(global, 'crypto', {12 configurable: true,13 value: {14 getRandomValues(array) {15 for (let i = 0; i < array.length; i++) {16 array[i] = Math.floor(Math.random() * 256)
5 unmodified lines
22})2324test.after(() => {25 delete global.navigator26 delete global.crypto27})2829test('works with polyfill', () => {30 is(typeof nanoid(), 'string')
3 unmodified lines