morenoh149 / react-native-contacts-test

An integration test for react-native-contacts native module

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to run the tests

hemraj-s opened this issue · comments

I am getting an error when running the tests on my machine. The error is as follows:

 FAIL  __tests__\index.android.js
  ? Test suite failed to run

    E:/react-native/react-native-contacts-test-master/__tests__/index.android.js
: Unexpected token (10:4)
         8 | it('renders correctly', () => {
         9 |   const tree = renderer.create(
      > 10 |     <Index />
           |     ^
        11 |   );
        12 | });
        13 |

Can you help please.

Steps that I followed:

  1. Extracted the folder
  2. Ran "yarn install"
  3. Ran "npm test"

TIA

I bet it's a babel config issue.

I'm not sure, but I'd look into the babel config and making sure that the Index component is available. I can look into this when I have time but I have no eta.