Detox: Does Detox work with React Native 0.58.0-rc.2?

Created on 22 Jan 2019  ·  6Comments  ·  Source: wix/Detox

We're currently using React Native 0.58.0-rc.2 and when running the example.spec.js no emulator is launched and the tests fail with this error message:

Timeout - Async callback was not invoked within the 120000ms timeout specified by jest.setTimeout.

Is it because of the React Native version? Is there anything we could try to make it work with the newer version?

Steps to Reproduce

  • Create a React Native application with react-native version 0.58.0-rc.2
  • Follow Detox getting started guide
  • When running the tests you have the sample tests you have the error

Detox, Node, Device, Xcode and macOS Versions

  • Detox: 10.0.2
  • React Native: 0.58.0-rc.2
  • Node: 11.7.0
  • Device: _emulator does not start_
  • Xcode: 10.1
  • macOS: 10.14.2
invalid

All 6 comments

Your description is lacking and not according to the template. There's nothing we can do with no verbose logs and device logs.

  • Did you try it on other RN versions?

We don't officially support RN58 just uety, but it doesn't mean it shouldn't work.

You're right, I've updated the first post. Now I'm getting a different error.

detox test gives me

Couldn't find preset "module:metro-react-native-babel-preset" relative to directory "/Users/egidiocaprino/workspace/yeppik-react-native"

If I remove "presets": ["module:metro-react-native-babel-preset"] from .babelrc tests start but then I get a error: bundling failed: SyntaxError error in the packager:

image

Hey @rotemmiz

Would you be able to help us? We'd love to use Detox for writing our e2e tests

Are you using Jest as your test runner? If so there might be collisions in configuration between unit tests and e2e.
I'm not really sure, try adding

“ignore”: [
         “path/to/e2e”
       ]

to your babel configuration.

Just chiming in that I'm using jest/detox and react native at 0.58.2, so it's definitely possible in later versions

@rotemmiz @zibs thank you for your help. We moved today from a RC version of React Native 0.58 to the stable one and now Detox works 😄

This helped too https://github.com/wix/detox/issues/389

Was this page helpful?
0 / 5 - 0 ratings