Files
life-echo/app-expo/tests/core/config.test.ts
Kevin 6d281c92a5 feat(app-expo): env variants, local iOS prebuild, and About diagnostics
Align staging/production builds with APP_VARIANT bundle IDs, allow staging HTTP on iOS, add ios-prebuild scripts for TestFlight, and show connected API URL on About for non-production builds.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-19 15:43:16 +08:00

24 lines
658 B
TypeScript

import {
appVariant,
config,
shouldShowAboutBackendUrl,
type AppVariant,
} from '@/core/config';
describe('shouldShowAboutBackendUrl', () => {
it('shows backend URL for development and staging', () => {
expect(shouldShowAboutBackendUrl('development')).toBe(true);
expect(shouldShowAboutBackendUrl('staging')).toBe(true);
});
it('hides backend URL for production', () => {
expect(shouldShowAboutBackendUrl('production')).toBe(false);
});
it('matches config.showAboutBackendUrl for current build', () => {
expect(config.showAboutBackendUrl).toBe(
shouldShowAboutBackendUrl(appVariant as AppVariant),
);
});
});