Skip to content

Conversation

@mstange
Copy link
Contributor

@mstange mstange commented Sep 3, 2025

Use the browser variant in Jest tests.
esbuild only supports code splitting in the configuration where we ship
actual ES modules to the browser. In that configuration, if a module is
used by both the main chunk and an async chunk, that module becomes a
separate chunk. That's rather sillyl for a module that's just a single
constant. So we just copy the constant and remove the import.
@codecov
Copy link

codecov bot commented Jan 20, 2026

Codecov Report

❌ Patch coverage is 54.34783% with 21 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.66%. Comparing base (98b5328) to head (891e105).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/utils/gz.ts 0.00% 12 Missing ⚠️
src/utils/window-console.ts 12.50% 7 Missing ⚠️
src/utils/gz.browser.ts 90.47% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5589      +/-   ##
==========================================
- Coverage   85.69%   85.66%   -0.03%     
==========================================
  Files         316      316              
  Lines       31141    31149       +8     
  Branches     8582     8488      -94     
==========================================
- Hits        26686    26685       -1     
- Misses       4025     4034       +9     
  Partials      430      430              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 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.

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.

1 participant