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
The walk stopped after 200 commits: lines older than f6cad02 point at it.
Do no import index.js in async/index.jsAndrey Sitnikbefore adoptionf6cad02
lines 1–4why, one step back1global.navigator = {2 product: 'ReactNative'3}4global.crypto = {Update dev practicesAndrey Sitnikbefore adoption1277ad4
line 5why, one step back5 getRandomValues(array) {Do no import index.js in async/index.jsAndrey Sitnikbefore adoptionf6cad02
lines 6–15why, one step back6 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', () => {Update dependenciesAndrey Sitnikbefore adoptiond3920db
line 16why, one step back16 expect(typeof nanoid()).toBe('string')Do no import index.js in async/index.jsAndrey Sitnikbefore adoptionf6cad02
line 17why, one step back17})