1import { LinearGradient } from 'expo-linear-gradient'; 2import React from 'react'; 3 4import { mountAndWaitFor as originalMountAndWaitFor } from './helpers'; 5 6export const name = 'LinearGradient'; 7const style = { width: 200, height: 200 }; 8 9export async function test( 10 { it, describe, beforeAll, jasmine, afterAll, expect, afterEach, beforeEach }, 11 { setPortalChild, cleanupPortal } 12) { 13 afterEach(async () => { 14 await cleanupPortal(); 15 }); 16 17 const mountAndWaitFor = (child, propName = 'onLayout') => 18 originalMountAndWaitFor(child, propName, setPortalChild); 19 20 describe(name, () => { 21 it(`renders`, async () => { 22 await mountAndWaitFor(<LinearGradient colors={['red', 'blue']} style={style} />); 23 }); 24 }); 25} 26