You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,8 +10,10 @@ React Native CodePush is a native module that enables over-the-air updates for R
10
10
11
11
#### Unit tests
12
12
13
-
-`cd android && ./gradlew :app:test`
14
-
- iOS: no unit tests yet.
13
+
-`npm run test:unit:android`
14
+
-`npm run test:unit:ios`
15
+
16
+
Prefer unit testing what's possible (even though, on iOS, this involves a simulator). Legacy code used E2E tests for everything, which is complex, error-prone, and slow. The existing E2E tests are still useful, but this is not a pattern to follow.
15
17
16
18
#### E2E Tests
17
19
-`npm run test:android` - Run Android-specific tests
@@ -54,7 +56,7 @@ React Native CodePush is a native module that enables over-the-air updates for R
54
56
-**Custom Test Runner**: TypeScript-based test framework in `test/`
55
57
-**Real App Testing**: Creates actual React Native apps for integration testing
56
58
-**Scenario Testing**: Update, rollback, and error scenarios
57
-
-**No unit test infra for JS/iOS yet**: JS/iOS only have the mocha-based integration suite above. `src/acquisition-sdk/__tests__/` contains tests ported from upstream `microsoft/code-push`, kept for future reference - they are deliberately not wired into `npm test` or any runner. Don't assume they're dead/forgotten code, and don't wire them in without setting up real unit test infra first.
59
+
-**No unit test infra for JS yet**: JS only has the mocha-based integration suite above. `src/acquisition-sdk/__tests__/` contains tests ported from upstream `microsoft/code-push`, kept for future reference - they are deliberately not wired into `npm test` or any runner. Don't assume they're dead/forgotten code, and don't wire them in without setting up real unit test infra first.
58
60
-**Templates**: `test/template/` holds native files (Podfile, AppDelegate, Android app files) and JS scenarios copied over top of a freshly generated RN/Expo app during test setup, overwriting its defaults — edit files here, not the generated project, for changes to persist
59
61
-**`test:ios` vs `test:setup:ios` vs `test:fast:ios`**: `test:ios` is just `test:setup:ios` followed by `test:fast:ios` — the two are meant to be split apart for local iteration.
60
62
-`test:setup:ios` (mocha `--ios --setup`) boots the simulator and provisions the test app once: copies templates, runs `pod install`, patches Info.plist/AppDelegate. It never builds or runs any test scenario.
0 commit comments