import { FeatureName } from '../../../core/featureFlags/feature'; import { Feature } from '../../../types/types'; describe('FeatureName', () => { it('should correctly map Feature.checkFeatureFlagImplementation to its name', () => { expect(FeatureName[Feature.checkFeatureFlagImplementation]).toBe( 'xpf_react_native_check_feature_flag' ); }); it('should correctly map Feature.crashReporter to its name', () => { expect(FeatureName[Feature.crashReporter]).toBe( 'xpf_react_native_crash_reporter' ); }); it('should not include undefined keys', () => { expect(Object.keys(FeatureName)).not.toContain(undefined); }); it('should not include any unexpected feature names', () => { const validFeatures = [ Feature.checkFeatureFlagImplementation, Feature.crashReporter, ]; const featureKeys = Object.keys(FeatureName); // Check if all feature keys are part of the valid features featureKeys.forEach(key => { expect(validFeatures).toContain(key); }); }); it('should have all values as strings', () => { const featureValues = Object.values(FeatureName); featureValues.forEach(value => { expect(typeof value).toBe('string'); }); }); });