UNPKG

expo-splash-screen

Version:

Provides a module to allow keeping the native Splash Screen visible until you choose to hide it.

27 lines (23 loc) 867 B
import { XML } from 'expo/config-plugins'; import { setSplashStrings } from '../withAndroidSplashStrings'; describe(setSplashStrings, () => { it('add expo_splash_screen_strings', () => { const results = setSplashStrings({ resources: {} }, 'cover'); const expectXML = `\ <resources> <string name="expo_splash_screen_resize_mode" translatable="false">cover</string> </resources>`; expect(XML.format(results)).toEqual(expectXML); }); it('override old expo_splash_screen_strings', () => { const results = setSplashStrings( { resources: { string: [{ $: { name: 'expo_splash_screen_resize_mode' }, _: 'contain' }] } }, 'native' ); const expectXML = `\ <resources> <string name="expo_splash_screen_resize_mode" translatable="false">native</string> </resources>`; expect(XML.format(results)).toEqual(expectXML); }); });