• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

optimizely / javascript-sdk / 39262215553
78%

Build:
DEFAULT BRANCH: master
Ran 19 Oct 2026 01:42PM UTC
Jobs 4
Files 125
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

19 Oct 2026 01:40PM UTC coverage: 77.624%. Remained the same
39262215553

push

github

web-flow
[FSSDK-13287] Add React Native Metro tests for optional dependencies (#1180)

## Summary
- **New test suite, `tests/react-native-metro/`:** checks how the SDK behaves in React Native apps when `fast-text-encoding`, `react-native-get-random-values` and `@react-native-async-storage/async-storage` are installed, missing, or replaced by the app's own polyfill or store.
- **Two Metro setups:** React Native 0.73 (Metro 0.80, which has the dependency-map bug behind #1179) and React Native 0.87 (fixed Metro). Each is a fixture with `@react-native/metro-config`, `metro` and Babel pinned by committed lockfiles. The `react-native` package isn't needed.
- **How a case runs** (`npm run test-rn-metro`):
  1. The SDK is packed and installed the way an app installs it.
  2. A small test app is bundled with the fixture's real Metro and React Native Metro config, loaded through `loadConfig` as the RN CLI does. React Native's startup module is skipped because it needs native code. `resolveRequest` decides which optional packages exist; packages that need native code resolve to small JS stand-ins.
  3. The bundle runs in a fresh Node `vm` context, which has no `TextEncoder` or `crypto`, like older Hermes. Cases that need a native `TextEncoder` add one.
  4. The app records which implementation the SDK used, its decisions, the dispatched event UUIDs, and any errors. The runner checks these against each case's expectation and prints a results table.
- **Matches app behaviour:** Metro's `require` is part of the bundle, so modules load exactly as in an app. The test app installs a non-throwing `ErrorUtils` handler, as React Native's startup code does, so a failed `require` outside module loading is reported as fatal (the red box) instead of rethrown to the caller.
- **CI:** a new `react_native_metro_test` job runs on every PR (Ubuntu, Node 20, about a minute).

The device testing for #1179 was done by hand on simulators. This automates the part that broke, Metro's bundling a... (continued)

1549 of 3029 branches covered (51.14%)

Branch coverage included in aggregate %.

8990 of 10548 relevant lines covered (85.23%)

261.52 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-18 - 39262215553.1 19 Oct 2026 01:42PM UTC 125
77.62
GitHub Action Run
2 run-22 - 39262215553.2 19 Oct 2026 01:43PM UTC 125
77.62
GitHub Action Run
3 run-20 - 39262215553.3 19 Oct 2026 01:42PM UTC 125
77.62
GitHub Action Run
4 run-24 - 39262215553.4 19 Oct 2026 01:43PM UTC 125
77.62
GitHub Action Run
Source Files on build 39262215553
  • Tree
  • List 125
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 5a388f54 on github
  • Prev Build on master (#38805102404)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc