The Wayback Machine - https://web.archive.org/web/20200614084006/https://github.com/wix/Detox/issues/1420
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

Update Mocking Guide #1420

Open
MiloszFilimowski opened this issue Jun 1, 2019 · 1 comment
Open

Update Mocking Guide #1420

MiloszFilimowski opened this issue Jun 1, 2019 · 1 comment

Comments

@MiloszFilimowski
Copy link

@MiloszFilimowski MiloszFilimowski commented Jun 1, 2019

Is your feature request related to a problem? Please describe.
This is releated to this.

I believe documentation on the topic of mocking is outdated. I'm quite new to React Native and it took me a while until I figured that current version of metro does not support rn-cli.config.js anymore.

Describe the solution you'd like

  1. It would be great to mention that since some metro version (not sure which one) either metro.config.js, metro.config.json or metro field in package.json should be configured instead.
  2. Add an example that you can put RN_SRC_EXT in package.json when not using custom session config.
  "detox": {
    "configurations": {
      "ios.sim.debug": {
        "binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/YourApp.app",
        "build": "RN_SRC_EXT=e2e.js xcodebuild -project ios/YourApp.xcodeproj -scheme YourApp -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build",
        "type": "ios.simulator",
        "name": "iPhone X"
      }
    },
  1. I also think that it should be mentioned that files should be in the same directory.
  2. Make part about react-native-repackager less significant as this is only valid for rn < 0.55.

Additional context
I don't know how relevant this is for experienced React Native users, but as a newcomer I found it quite confusing.

Hope this sounds reasonable :)

@LeoNatan
Copy link
Member

@LeoNatan LeoNatan commented Jun 1, 2019

Thanks. Feel free to submit a pull request with the updates. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.