1import * as Random from 'expo-random'; 2 3export const name = 'Random'; 4 5export async function test({ describe, it, expect }) { 6 describe('Random', async () => { 7 it('getRandomBytesAsync()', async () => { 8 const length = 3; 9 const bytes = await Random.getRandomBytesAsync(length); 10 expect(bytes instanceof Uint8Array).toBe(true); 11 expect(bytes.length).toBe(length); 12 const moreBytes = await Random.getRandomBytesAsync(length); 13 expect(moreBytes[0]).not.toBe(bytes[0]); 14 }); 15 }); 16} 17