Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
EgidioCaprino opened this issue Jan 22, 2019 · 6 comments
Closed

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

EgidioCaprino opened this issue Jan 22, 2019 · 6 comments

Comments

@EgidioCaprino
Copy link

EgidioCaprino commented Jan 22, 2019

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
@rotemmiz
Copy link
Member

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.

@EgidioCaprino
Copy link
Author

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

@EgidioCaprino
Copy link
Author

Hey @rotemmiz

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

@rotemmiz
Copy link
Member

rotemmiz commented Jan 29, 2019

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.

@zibs
Copy link

zibs commented Jan 31, 2019

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

@EgidioCaprino
Copy link
Author

@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 #389

@lock lock bot locked as resolved and limited conversation to collaborators Feb 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants