UNPKG

@vandrei977/react-native-render-html

Version:

The hackable, full-featured Open Source HTML rendering solution for React Native.

16 lines (14 loc) 519 B
import { Linking } from 'react-native'; import { defaultAOnPress } from '../defaultRendererProps'; describe('defaultRendererProps', () => { describe('defaultAOnPress', () => { it('should not throw', async () => { Linking.canOpenURL = jest.fn(async () => false); await expect(defaultAOnPress({}, 'hi')).resolves.not.toThrow(); Linking.canOpenURL = jest.fn(async () => true); await expect( defaultAOnPress({}, 'https://domain.com') ).resolves.not.toThrow(); }); }); });