Skip to content

test(cypress): drop redundant uncaught:exception suppression in memory-router spec#4826

Open
voidmatcha wants to merge 2 commits into
module-federation:mainfrom
voidmatcha:fix/e2e-non-asserting-checks
Open

test(cypress): drop redundant uncaught:exception suppression in memory-router spec#4826
voidmatcha wants to merge 2 commits into
module-federation:mainfrom
voidmatcha:fix/e2e-non-asserting-checks

Conversation

@voidmatcha

Copy link
Copy Markdown

Description

Removes the per-spec Cypress.on('uncaught:exception', () => false) in apps/router-demo/router-host-2000/cypress/e2e/memory-router.cy.ts.

The global handler in cypress/support/e2e.ts already allow-lists the only errors this happy-path navigation flow can legitimately emit (the React-bridge Failed to construct 'HTMLElement' / Illegal constructor and the react-dom/client module-not-found cases) and returns true (fails the test) for everything else. The per-spec handler was strictly weaker: it swallowed every uncaught exception unconditionally, so a genuine regression in this flow would be silently hidden instead of failing. The sibling happy-path specs (remote1.cy.ts, remote2.cy.ts, remote3.cy.ts, host.cy.ts) already run the same federated-remote flow with no per-spec handler, relying on the global allow-list. This brings memory-router.cy.ts in line with them and restores real-error visibility.

The dedicated error specs (remote-render-error.cy.ts, remote-resource-error.cy.ts), which deliberately trigger errors, keep their handlers and are intentionally untouched.

Related Issue

No separate tracking issue. This is a small test-suite hardening with no behavior change to shipped packages. Happy to open an issue first if you prefer that for traceability.

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have added tests to cover my changes.
  • All new and existing tests passed (could not run the Cypress suite locally without the demo dev server; the change only removes an error-suppression handler).
  • I have updated the documentation.

Found while reviewing the test suite with e2e-skills/e2e-reviewer.

@changeset-bot

changeset-bot Bot commented Jun 17, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 323b837

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@netlify

netlify Bot commented Jun 17, 2026

Copy link
Copy Markdown

Deploy Preview for module-federation-docs ready!

Name Link
🔨 Latest commit 323b837
🔍 Latest deploy log https://app.netlify.com/projects/module-federation-docs/deploys/6a38a27df3199400085b441d
😎 Deploy Preview https://deploy-preview-4826--module-federation-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@voidmatcha

Copy link
Copy Markdown
Author

Verified locally (cypress run, electron headless, Node 20):

  • handler present: 4/4 passing
  • handler removed (this PR): 4/4 passing

The flow throws no uncaught exception that the global handler in cypress/support/e2e.ts does not already allow-list, so the per-spec blanket () => false is redundant. Removing it keeps the suite green and restores real-error visibility.

As-Is: handler present

image

To-Be: handler removed

image

@pkg-pr-new

pkg-pr-new Bot commented Jun 22, 2026

Copy link
Copy Markdown

Open in StackBlitz

@module-federation/devtools

pnpm add https://pkg.pr.new/@module-federation/devtools@323b837

@module-federation/cli

pnpm add https://pkg.pr.new/@module-federation/cli@323b837

create-module-federation

pnpm add https://pkg.pr.new/create-module-federation@323b837

@module-federation/dts-plugin

pnpm add https://pkg.pr.new/@module-federation/dts-plugin@323b837

@module-federation/enhanced

pnpm add https://pkg.pr.new/@module-federation/enhanced@323b837

@module-federation/error-codes

pnpm add https://pkg.pr.new/@module-federation/error-codes@323b837

@module-federation/esbuild

pnpm add https://pkg.pr.new/@module-federation/esbuild@323b837

@module-federation/managers

pnpm add https://pkg.pr.new/@module-federation/managers@323b837

@module-federation/manifest

pnpm add https://pkg.pr.new/@module-federation/manifest@323b837

@module-federation/metro

pnpm add https://pkg.pr.new/@module-federation/metro@323b837

@module-federation/metro-plugin-rnc-cli

pnpm add https://pkg.pr.new/@module-federation/metro-plugin-rnc-cli@323b837

@module-federation/metro-plugin-rnef

pnpm add https://pkg.pr.new/@module-federation/metro-plugin-rnef@323b837

@module-federation/metro-plugin-rock

pnpm add https://pkg.pr.new/@module-federation/metro-plugin-rock@323b837

@module-federation/modern-js

pnpm add https://pkg.pr.new/@module-federation/modern-js@323b837

@module-federation/modern-js-v3

pnpm add https://pkg.pr.new/@module-federation/modern-js-v3@323b837

@module-federation/native-federation-tests

pnpm add https://pkg.pr.new/@module-federation/native-federation-tests@323b837

@module-federation/native-federation-typescript

pnpm add https://pkg.pr.new/@module-federation/native-federation-typescript@323b837

@module-federation/nextjs-mf

pnpm add https://pkg.pr.new/@module-federation/nextjs-mf@323b837

@module-federation/node

pnpm add https://pkg.pr.new/@module-federation/node@323b837

@module-federation/observability-plugin

pnpm add https://pkg.pr.new/@module-federation/observability-plugin@323b837

@module-federation/retry-plugin

pnpm add https://pkg.pr.new/@module-federation/retry-plugin@323b837

@module-federation/rsbuild-plugin

pnpm add https://pkg.pr.new/@module-federation/rsbuild-plugin@323b837

@module-federation/rspack

pnpm add https://pkg.pr.new/@module-federation/rspack@323b837

@module-federation/rspress-plugin

pnpm add https://pkg.pr.new/@module-federation/rspress-plugin@323b837

@module-federation/runtime

pnpm add https://pkg.pr.new/@module-federation/runtime@323b837

@module-federation/runtime-core

pnpm add https://pkg.pr.new/@module-federation/runtime-core@323b837

@module-federation/runtime-tools

pnpm add https://pkg.pr.new/@module-federation/runtime-tools@323b837

@module-federation/sdk

pnpm add https://pkg.pr.new/@module-federation/sdk@323b837

@module-federation/storybook-addon

pnpm add https://pkg.pr.new/@module-federation/storybook-addon@323b837

@module-federation/third-party-dts-extractor

pnpm add https://pkg.pr.new/@module-federation/third-party-dts-extractor@323b837

@module-federation/treeshake-frontend

pnpm add https://pkg.pr.new/@module-federation/treeshake-frontend@323b837

@module-federation/treeshake-server

pnpm add https://pkg.pr.new/@module-federation/treeshake-server@323b837

@module-federation/typescript

pnpm add https://pkg.pr.new/@module-federation/typescript@323b837

@module-federation/utilities

pnpm add https://pkg.pr.new/@module-federation/utilities@323b837

@module-federation/webpack-bundler-runtime

pnpm add https://pkg.pr.new/@module-federation/webpack-bundler-runtime@323b837

@module-federation/bridge-react

pnpm add https://pkg.pr.new/@module-federation/bridge-react@323b837

@module-federation/bridge-react-webpack-plugin

pnpm add https://pkg.pr.new/@module-federation/bridge-react-webpack-plugin@323b837

@module-federation/bridge-shared

pnpm add https://pkg.pr.new/@module-federation/bridge-shared@323b837

@module-federation/bridge-vue3

pnpm add https://pkg.pr.new/@module-federation/bridge-vue3@323b837

@module-federation/inject-external-runtime-core-plugin

pnpm add https://pkg.pr.new/@module-federation/inject-external-runtime-core-plugin@323b837

commit: 323b837

@github-actions

Copy link
Copy Markdown
Contributor

Bundle Size Report

10 package(s) changed, 31 unchanged.

Package dist + ESM entry

Package Total dist (raw) Delta ESM gzip Delta
@module-federation/cli 26.3 kB no change 786 B no change
@module-federation/core 39.1 kB no change 173 B no change
@module-federation/devtools 664.0 kB no change 4.0 kB no change
@module-federation/enhanced 809.2 kB no change 672 B no change
@module-federation/managers 69.8 kB no change 334 B no change
@module-federation/manifest 136.1 kB no change 182 B no change
@module-federation/metro-plugin-rnc-cli 0 B no change 314 B no change
@module-federation/node 193.4 kB no change 217 B no change
@module-federation/storybook-addon 79.1 kB no change 100 B no change
@module-federation/utilities 110.6 kB no change 328 B no change

Bundle targets

Package Web bundle (gzip) Delta Node bundle (gzip) Delta
@module-federation/cli 2.3 kB -35 B (-1.5%) 2.3 kB -35 B (-1.5%)
@module-federation/core 1.1 kB -34 B (-3.0%) 1.0 kB -32 B (-3.0%)
@module-federation/devtools 30.2 kB -30 B (-0.1%) 30.2 kB -30 B (-0.1%)
@module-federation/enhanced 2.6 kB -46 B (-1.7%) 2.6 kB -46 B (-1.7%)
@module-federation/managers 2.4 kB -28 B (-1.1%) 2.4 kB -28 B (-1.1%)
@module-federation/manifest 6.1 kB -42 B (-0.7%) 6.1 kB -42 B (-0.7%)
@module-federation/metro-plugin-rnc-cli 411 B -27 B (-6.2%) 411 B -27 B (-6.2%)
@module-federation/node 9.2 kB -30 B (-0.3%) 9.2 kB -30 B (-0.3%)
@module-federation/storybook-addon 1.9 kB -26 B (-1.3%) 1.7 kB -26 B (-1.4%)
@module-federation/utilities 2.6 kB -34 B (-1.3%) 2.6 kB -34 B (-1.3%)

Consumer scenarios

Scenario Web output (gzip) Delta Node output (gzip) Delta Gap (node-web) Delta
Enhanced remoteEntry 21.4 kB -21 B (-0.1%) 22.5 kB -14 B (-0.1%) +1.1 kB +7 B

Total dist (raw): 6.81 MB (no change)
Total ESM gzip: 78.5 kB (no change)
Total web bundle (gzip): 207.1 kB (-332 B (-0.2%))
Total node bundle (gzip): 207.6 kB (-330 B (-0.2%))
Tracked ./bundler entry gzip: 556 B (no change)
Tracked ./bundler web bundle (gzip): 4.8 kB (no change)
Tracked ./bundler node bundle (gzip): 4.8 kB (no change)

Bundle sizes are generated with rslib (Rspack). Package-root metrics preserve the historical report. Tracked subpath exports such as ./bundler are measured separately so ENV_TARGET-driven tree-shaking is visible. Bare imports are externalized to keep package-level sizes consistent, and assets are emitted as resources.

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.

2 participants