Skip to content

test: fix coverage for typescript, java, and add iOS native + fix 3 e2e flake failure modes#9054

Merged
mikehardy merged 8 commits into
mainfrom
fix-typescript-coverage
Jun 17, 2026
Merged

test: fix coverage for typescript, java, and add iOS native + fix 3 e2e flake failure modes#9054
mikehardy merged 8 commits into
mainfrom
fix-typescript-coverage

Conversation

@mikehardy

@mikehardy mikehardy commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

Problems

  1. TypeScript path mismatch — Metro instruments bob dist/module/*.js; Codecov/Jest track packages/*/lib/**. NYC was configured to include only lib/**, so runtime __coverage__ keys on dist/ were dropped before source-map remap could run.

  2. Coverage never reached NYC — Jet transferred global.__coverage__ via HTTP POST to /coverage. Full e2e payloads (~4.5MB with inline source maps) were rejected (HTTP 426); NYC reported 0/0.

Solutions

  1. TypeScript remap — Include packages/*/dist/**/*.js in NYC include (with sourceMap: true, exclude-after-remap: true) and enable useInlineSourceMaps in tests/.babelrc so hits remap to lib/*.ts.

  2. WS coverage transfer — Yarn patches on jet, mocha-remote-server, and mocha-remote-client (in tests/package.json): client signals coverage-ready, server pulls over the existing WebSocket (flatted serialization), merges into NYC — no HTTP POST size limit.

Misc

  • also fixed simulator boot issues
  • fixed ios e2e app startup coordination issues
  • fixed e2e transient disconnect / app disconnection issues

Test plan

  • macOS e2e coverage run completes with non-zero NYC output
  • packages/*/lib/modular.ts shows e2e hits in lcov (not only Jest)
  • Codecov project/patch checks reflect e2e contribution

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request improves the accuracy of end-to-end test coverage reporting by configuring NYC to correctly handle source maps for TypeScript-converted packages. By enabling source-map remapping and adjusting file inclusion/exclusion rules, the changes ensure that instrumentation performed on distribution files is correctly attributed to the original source files in Codecov.

Highlights

  • NYC Configuration Update: Enabled source-map support and adjusted include/exclude patterns in nyc.config.js to ensure proper coverage mapping for TypeScript-converted files.
  • Babel Instrumentation: Updated .babelrc to enable inline source maps, facilitating accurate instrumentation remapping during E2E coverage runs.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the test coverage configuration to support TypeScript files and source maps by modifying .babelrc and nyc.config.js. Specifically, it enables inline source maps, expands the included files to include .ts and .tsx extensions, and adds exclusions for dist directories. However, setting 'exclude-after-remap': false will cause NYC to exclude files in dist/ before they are remapped to their TypeScript sources, resulting in untracked coverage. It is recommended to set 'exclude-after-remap' to true to ensure coverage is correctly mapped and tracked.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread tests/nyc.config.js Outdated
@mikehardy mikehardy force-pushed the fix-typescript-coverage branch 2 times, most recently from 3782408 to 38690eb Compare June 16, 2026 16:30
@mikehardy mikehardy changed the title test: fix coverage for typescript-converted files test: fix coverage typescript mapping and lcov file transfer in e2e Jun 16, 2026
@mikehardy mikehardy added Type: Testing Issues or PRs relating to testing (the library or user code testing) tools: ci labels Jun 16, 2026
@mikehardy mikehardy force-pushed the fix-typescript-coverage branch from 39f1e50 to 998146f Compare June 16, 2026 17:28
@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.95%. Comparing base (fc317fa) to head (0ab8c7b).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9054      +/-   ##
==========================================
+ Coverage   61.86%   62.95%   +1.09%     
==========================================
  Files         245      276      +31     
  Lines       11948    13837    +1889     
  Branches     2901     2875      -26     
==========================================
+ Hits         7391     8710    +1319     
- Misses       4482     5074     +592     
+ Partials       75       53      -22     
🚀 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.

@mikehardy mikehardy force-pushed the fix-typescript-coverage branch 2 times, most recently from f977758 to 8198aa2 Compare June 17, 2026 01:40
Fix Jacoco Android e2e report paths for AGP 8.x, add iOS native coverage
pull via a small native module, and scope LLVM profile link flags to the
testing app. Resolve Swift compatibility linker failures on ccache CI
builds with DT_TOOLCHAIN_DIR, explicit Swift libs, and a runtime stub.
Match local Xcode 26.5 runners and switch Detox to iPhone 17 for
macos-26 / latest-stable Xcode simulator availability.
Poll simctl bootstatus with migration logging before app install, raise pre-boot and job timeouts, start simulator artifacts after boot, and document iOS simulator reliability in OKF.
…nostics

Buffer Detox early-ready race, wait for Jet before launchApp, log app
lifecycle in AppDelegate for simulator.log triage, and document Detox/Jet
orchestration grep patterns in the OKF bundle.
@mikehardy mikehardy force-pushed the fix-typescript-coverage branch from a7d5aad to c4d3b47 Compare June 17, 2026 22:29
@mikehardy

Copy link
Copy Markdown
Collaborator Author

After ridiculously extensive testing, on a PR that is basically all testing. This looks good to go

@mikehardy mikehardy merged commit 8e53fa6 into main Jun 17, 2026
20 checks passed
@mikehardy mikehardy deleted the fix-typescript-coverage branch June 17, 2026 23:51
@mikehardy mikehardy changed the title test: fix coverage typescript mapping and lcov file transfer in e2e test: fix coverage for typescript, java, and add iOS native + fix 3 e2e flake failure modes Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tools: ci Type: Testing Issues or PRs relating to testing (the library or user code testing)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FirebaseInAppMessaging V9 (and other packages) modular APIs not exercised in CI?

1 participant