Skip to content
Myr

react-native-polyfill.test.js

This file

Path

test/react-native-polyfill.test.js

17 lines · 344 bytes · JavaScript

Last changed by

Update dev practicesAndrey Sitnikbefore adoption1277ad4

History of this file

Take it

The walk stopped after 200 commits: lines older than d64ae77 point at it.

Speed up testsAndrey Sitnikbefore adoptiond64ae77

lines 1–4why, one step back
1global.navigator = {
2 product: 'ReactNative'3}4global.crypto = {

Update dev practicesAndrey Sitnikbefore adoption1277ad4

line 5why, one step back
5 getRandomValues(array) {

Speed up testsAndrey Sitnikbefore adoptiond64ae77

lines 6–17why, one step back
6 for (let i = 0; i < array.length; i++) {
7 array[i] = Math.floor(Math.random() * 256)8 }9 return array10 }11}1213let { nanoid } = require('../index.browser')1415it('works with polyfill', () => {16 expect(typeof nanoid()).toEqual('string')17})