expo-splash-screen
Version:
Provides a module to allow keeping the native Splash Screen visible until you choose to hide it.
16 lines (11 loc) • 431 B
text/typescript
import { Platform } from 'react-native';
import * as SplashScreen from '../';
// Test that nothing happens on web and SSR
// also ensure that no errors are thrown.
const works = Platform.OS !== 'web';
it(`preventAutoHideAsync doesn't throw`, async () => {
expect(await SplashScreen.preventAutoHideAsync()).toBe(works);
});
it(`hideAsync doesn't throw`, async () => {
expect(await SplashScreen.hideAsync()).toBe(works);
});