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
This failed for me, too (react-native 0.57.5, jest 23.6.0). I was able to find a solution, but it was totally different (and in my case, a more elegant fix) than here.
Check out the ticket I filed for more details.
Essentially, I had to have NativeModules fleshed out by a function passed as the second parameter to jest.mock() and put this is in a script run at the beginning of each test using Jest's setupFiles config option.