react-native-polyfill.test.js
This file
Path
test/react-native-polyfill.test.js
17 lines · 341 bytes · JavaScript
Last changed by
Update dependenciesAndrey Sitnikbefore adoptiond3920db
History of this fileTake it
123456789101112131415161718global.navigator = { product: 'ReactNative'}global.crypto = { getRandomValues(array) { for (let i = 0; i < array.length; i++) { array[i] = Math.floor(Math.random() * 256) } return array }}
let { nanoid } = require('../index.browser')
it('works with polyfill', () => { expect(typeof nanoid()).toBe('string')})