Skip to content

Commit

Permalink
Fixed pod install instructions (#3243)
Browse files Browse the repository at this point in the history
* Fixed pod install instructions

Yarn must be run prior to pod install, otherwise pod install fails with "Error: Cannot find module 'mkdirp'"

* yarn start is not necessary anymore

* Refer to rntester readme
  • Loading branch information
scarlac authored Aug 9, 2022
1 parent 9996be8 commit 1c21a9d
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions website/contributing/how-to-run-and-write-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ yarn run lint

### iOS Tests

Start off by running `pod install` inside the `RNTester` directory. This will set up your native dependencies and create a `RNTesterPods` Xcode workspace.
Follow the [README.md](https://github.com/facebook/react-native/blob/main/packages/rn-tester/README.md) instructions in the `packages/rn-tester` directory.

Then, go back to the root of your React Native checkout and run `yarn` followed by `yarn start`. This will set up your JavaScript dependencies.
Then, go back to the root of your React Native checkout and run `yarn`. This will set up your JavaScript dependencies.

At this point, you can run iOS tests by invoking the following script from the root of your React Native checkout:

Expand All @@ -43,6 +43,16 @@ Xcode also allows running individual tests through its Test Navigator. You can a
`objc-test.sh` ensures your test environment is set up to run all tests. It also disables tests that are known to be flaky or broken. Keep this in mind when running tests using Xcode. If you see an unexpected failure, see if it's disabled in `objc-test.sh` first.
:::

#### iOS Podfile/Ruby tests

If you are making modifications to `Podfile` configurations then there are Ruby tests that can verify these.

To run the ruby tests:
```bash
cd scripts
sh run_ruby_tests.sh
```

### Android Tests

The Android unit tests do not run in an emulator. They use a normal Java installation. The test suite is built using the [Buck build tool][buck-install].
Expand Down

0 comments on commit 1c21a9d

Please sign in to comment.