import { Platform } from 'react-native' import { isLiquidGlassEnabled, setLiquidGlassCapability } from '../../utils/liquid_glass' const mockPlatform = (OS: 'ios' | 'android', Version: string | number) => { Object.defineProperty(Platform, 'OS', { value: OS, configurable: true }) Object.defineProperty(Platform, 'Version', { value: Version, configurable: true }) } describe('isLiquidGlassEnabled', () => { afterEach(() => { setLiquidGlassCapability(false) }) it('is false until the host enables it', () => { mockPlatform('ios', '26.0') expect(isLiquidGlassEnabled()).toBe(false) }) it('is true when the host enables it on iOS 26 or later', () => { mockPlatform('ios', '26.0') setLiquidGlassCapability(true) expect(isLiquidGlassEnabled()).toBe(true) }) it('is false below iOS 26 even when the host enables it', () => { mockPlatform('ios', '18.5') setLiquidGlassCapability(true) expect(isLiquidGlassEnabled()).toBe(false) }) it('is false on android even when the host enables it', () => { mockPlatform('android', 36) setLiquidGlassCapability(true) expect(isLiquidGlassEnabled()).toBe(false) }) })