Skip to content

Instantly share code, notes, and snippets.

@eugenehp
Created April 5, 2021 20:13
Show Gist options
  • Save eugenehp/25c3d515b3260b86024e2cb179561005 to your computer and use it in GitHub Desktop.
Save eugenehp/25c3d515b3260b86024e2cb179561005 to your computer and use it in GitHub Desktop.
react-native-randomness tests
import * as Randomness from '../index';
describe('Generates random', () => {
it('Generates random bytes', async () => {
const data = await Randomness.random();
expect(data).not.toBe(null);
});
it('Generates random bytes of given length ', async () => {
const data = await Randomness.random(100);
expect(data.length).toBe(100);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment