Skip to content

test(bundler-tests): bundle platform packages with Metro, Expo and Jest jsdom - #7131

Merged
overbalance merged 1 commit into
open-telemetry:mainfrom
embrace-io:overbalance/bundler-tests-platform-resolution
Sep 28, 2026
Merged

overbalance merged 1 commit into
open-telemetry:mainfrom
embrace-io:overbalance/bundler-tests-platform-resolution

Conversation

@overbalance

Copy link
Copy Markdown
Contributor

Which problem is this PR solving?

The bundler tests did not cover React Native bundlers or Jest's jsdom environment, so platform resolution regressions there went unnoticed.

Short description of the changes

  • Add bundler-tests/react-native/metro: builds the platform packages with Metro for ios and android using the stock @react-native/metro-config defaults, and fails if any platform/node file is bundled or a package bundles no platform/browser file.
  • Add bundler-tests/react-native/expo: runs expo export for ios and android with the stock expo/metro-config defaults and applies the same checks to the source maps.
  • Add bundler-tests/browser/jest-jsdom: checks that Jest with testEnvironment: jsdom resolves the browser implementations, and that the node environment still resolves node.

Type of change

  • Tests

How Has This Been Tested?

  • npm run test:bundle in each new fixture

Checklist:

  • Followed the style guidelines of this project
  • Unit tests have been added

@overbalance
overbalance requested review from a team as code owners September 28, 2026 23:17
@overbalance
overbalance force-pushed the overbalance/bundler-tests-platform-resolution branch from 3699031 to 3eb1bfc Compare September 28, 2026 23:18
@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Pull request dashboard status

Merged · refreshed 2026-09-28 23:43 UTC

Status above doesn't look right?
  • Anything look wrong? Report it with what you expected; it helps us improve the dashboard.

@codecov

codecov Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.04%. Comparing base (2f7189b) to head (3eb1bfc).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7131   +/-   ##
=======================================
  Coverage   95.04%   95.04%           
=======================================
  Files         383      383           
  Lines       13455    13455           
  Branches     3094     3094           
=======================================
  Hits        12788    12788           
  Misses        667      667           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@overbalance
overbalance added this pull request to the merge queue Sep 28, 2026
@trentm

trentm commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

IIUC, these pass now, but help show failures in work you are doing on #7088

Merged via the queue into open-telemetry:main with commit e696b3e Sep 28, 2026
25 checks passed
@overbalance
overbalance deleted the overbalance/bundler-tests-platform-resolution branch September 28, 2026 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants