Skip to content

Commit

Permalink
Merge pull request #50049 from margelo/chore/fix-e2e-tests
Browse files Browse the repository at this point in the history
[NoQA] Update e2e dev instructions
  • Loading branch information
aldo-expensify authored Oct 2, 2024
2 parents c301698 + e074dfd commit 66d1025
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions tests/e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,16 @@ npm run android

3. We need to modify the app entry to point to the one for the tests. Therefore rename `./index.js` to `./appIndex.js` temporarily.

4. Create a new `./index.js` with the following content:
```js
require('./src/libs/E2E/reactNativeLaunchingTest');
```

5. In `./src/libs/E2E/reactNativeLaunchingTest.ts` change the main app import to the new `./appIndex.js` file:
```diff
- import '../../../index';
+ import '../../../appIndex';
```

6. You can now run the tests. This command will invoke the test runner:
4. Temporarily add to the `package.json` a `main` field pointing to the e2e entry file:

```diff
{
"private": true,
+ "main": "src/libs/E2E/reactNativeEntry.ts"
}
```

5. You can now run the tests. This command will invoke the test runner:

```sh
npm run test:e2e:dev
Expand Down

0 comments on commit 66d1025

Please sign in to comment.