title: Cannot find module 'setupDevtools' React-Native
body: <p>I am getting the following error:</p>
  
  <pre><code>Cannot find module 'setupDevtools' from 'setup.js'
  
    at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:169:17
  </code></pre>
  
  <p>My JSON.package file looks like this:</p>
  
  <pre><code>{
    "name": "MiBase",
    "version": "0.0.1",
    "private": true,
    "scripts": {
      "start": "node node_modules/react-native/local-cli/cli.js start",
      "test": "jest"
    },
    "dependencies": {
      "babel-preset-env": "^1.7.0",
      "i": "^0.3.6",
      "jest-react-native": "^18.0.0",
      "react": "16.3.1",
      "react-native": "0.55.3",
      "react-native-datepicker": "^1.7.2",
      "react-native-image-picker": "^0.26.7",
      "react-native-ui-xg": "0.0.6",
      "react-navigation": "^1.5.11"
    },
    "devDependencies": {
      "babel-jest": "^22.4.3",
      "babel-preset-react-native": "3.0.0",
      "jest": "22.4.3",
      "react-test-renderer": "^16.3.1"
    },
    "jest": {
       "preset": "react-native",
       "moduleNameMapper": {
       "\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "&lt;rootDir&gt;/__tests__/loginTest.js",
       "\\.(css|sass)$": "&lt;rootDir&gt;/__tests__/loginTest.js"
     },
     "transformIgnorePatterns": [
       "node_modules"
     ],
     "coveragePathIgnorePatterns": [
       "node_modules"
     ],
       "modulePathIgnorePatterns": [
       "node_modules"
     ]
   }
  </code></pre>
  
  <p>}</p>
  
  <p>My test file looks like this:</p>
  
  <pre><code>// __tests__/loginTest.js
  import 'react-native';
  import React from 'react';
  import HomeSreen from '../App';
  
  import renderer from 'react-test-renderer';
  
  test('renders correctly', () =&gt; {
    const tree = renderer.create(&lt;LoginScreen /&gt;).toJSON();
    expect(tree).toMatchSnapshot();
  });
  </code></pre>
  
  <p>I am very new to React Native and even newer to testing with it. Everything I have learnt or have tried to solve this issue has come from these three places:</p>
  
  <blockquote>
    <p><a href="https://facebook.github.io/jest/docs/en/tutorial-react-native.html" rel="nofollow noreferrer">https://facebook.github.io/jest/docs/en/tutorial-react-native.html</a>
    <a href="https://stackoverflow.com/questions/47781736/jest-cannot-find-module-setupdevtools-from-setup-js">Jest Cannot find module &#39;setupDevtools&#39; from &#39;setup.js&#39;</a>
    <a href="https://stackoverflow.com/questions/45104226/jest-cannot-find-module-setupdevtools-from-setup-js">Jest - Cannot find module &#39;setupDevtools&#39; from &#39;setup.js&#39;</a></p>
  </blockquote>
  
  <p>I also have other functions in the class that I am not trying to test at this point. I am only trying to test the GUI functionality and that everything displays correctly. These functions are for processing http responses and JSON parsing.</p>