Here is a simple component that I am trying to test using React Native 0.39 and Jest 18:
// index.ios.js import React, { Component } from \'react\'; import { Ap
#__mocks__/react-native-modules const ReactNative = require('react-native') ReactNative.NativeModules = { Defaults: { RU: { publicKey: '', privateKey: '', }, }, } module.exports = ReactNative
and then
# in test file jest.mock('react-native-modules') import 'react-native-modules'