Something went wrong. Try again.
Mirror — see github.com/blacksky-algorithms/blacksky.community
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051const {IOSConfig} = require('expo/config-plugins')
const createAppConfig = require('../../app.config')
const originalBuildEnvironment = process.env.EXPO_PUBLIC_ENV
afterEach(() => { if (originalBuildEnvironment === undefined) { delete process.env.EXPO_PUBLIC_ENV } else { process.env.EXPO_PUBLIC_ENV = originalBuildEnvironment }})
it.each([ ['local development', undefined], ['development', 'development'], ['end-to-end testing', 'e2e'], ['TestFlight', 'testflight'], ['production', 'production'],])( 'stays phone-only and sets parent device families for %s', (_name, environment) => { if (environment === undefined) { delete process.env.EXPO_PUBLIC_ENV } else { process.env.EXPO_PUBLIC_ENV = environment }
const config = createAppConfig({name: 'Blacksky', slug: 'blacksky'}).expo
expect(config.ios.supportsTablet).toBe(false) expect( IOSConfig.DeviceFamily.formatDeviceFamilies( IOSConfig.DeviceFamily.getDeviceFamilies(config), ), ).toBe('"1"') expect(config.ios.infoPlist.UISupportedInterfaceOrientations).toEqual([ 'UIInterfaceOrientationPortrait', ]) expect( config.ios.infoPlist['UISupportedInterfaceOrientations~ipad'], ).toEqual([ 'UIInterfaceOrientationPortrait', 'UIInterfaceOrientationPortraitUpsideDown', 'UIInterfaceOrientationLandscapeLeft', 'UIInterfaceOrientationLandscapeRight', ]) },)