Skip to content

[FSSDK-13413] Remove the old browser/UMD test setup and Karma leftovers - #1187

Merged
Raju Ahmed (raju-opti) merged 1 commit into
masterfrom
raju/remove-old-browser-tests
Nov 9, 2026
Merged

Raju Ahmed (raju-opti) merged 1 commit into
masterfrom
raju/remove-old-browser-tests

Conversation

@raju-opti

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #1186. tests/browser now runs browser and UMD tests in CI, so this removes the setup it replaced, plus leftovers from the Karma era.

  • Remove the old root browser/UMD setup.
    • Deleted: vitest.browser.config.mts, vitest.umd.config.mts, scripts/run-browser-tests.js, scripts/run-umd-tests.js, scripts/patch-vitest-viewport.js, vitest/umd-plugin.ts.
    • Root package.json: removed the test-browser* / test-umd* scripts and the @vitest/browser, browserstack-local and webdriverio devDependencies.
    • Root lockfile: 220 entries removed, none added. npm uninstall alone would have kept @vitest/browser/webdriverio and their dependencies as optional peers of the root Vitest, so those were pruned too. Re-resolving moved @babel/runtime from 7.28.4 to 7.29.13 (in range).
  • Make tests/browser self-contained. It no longer imports from the root vitest/ folder, which is gone.
    • The request logger and public/console-capture.js moved into it.
    • The console-capture plugin was merged into the local one: it keeps the /__vitest_console__ endpoint and injects the script via transformIndexHtml.
    • The UMD bundle is copied to tests/browser/public/dist, which is gitignored via dist/.
  • Remove Karma leftovers.
    • Deleted lib/index.browser.umdtests.js. Nothing ran it, and two of its imports no longer exist.
    • Removed the *.umdtests.js patterns from .eslintignore, both tsconfigs, .platform-isolation.config.js and scripts/platform-utils.js.
    • Removed the BROWSER_STACK_* env var fallbacks and the commented-out crossbrowser_and_umd_unit_tests CI job.
  • Update docs and comments.
    • Comments and the tests/browser README describe the current setup instead of comparing it with the removed one.
    • vitest3-compat.setup.ts is renamed to restore-all-mocks.setup.ts.
    • The root README's testing section points to tests/browser.
    • CHANGELOG.md keeps its historical entries.

No SDK source changes.

Test plan

  • Root:
    • npm run validate-platform-isolation: passes.
    • npm run lint: 0 errors.
    • npm run test-vitest: 1128 passed.
    • npm run test-mocha: 815 passing.
  • tests/browser, local Chrome:
    • Full suite: 1026/1026.
    • npm run test-umd-local (full rolldown build, bundle copied to public/dist): 2/2.
    • Console capture and request logger (VITEST_CONSOLE_CAPTURE / VITEST_REQUEST_LOGGER): both work from their new location.
  • A repo-wide search finds no references to the removed files, Vitest 3, Karma, umdtests or BROWSER_STACK outside CHANGELOG.md and lockfiles.
  • BrowserStack: covered by this PR's CI run (browser_tests job).

Issues

  • FSSDK-13413

🤖 Generated with Claude Code

tests/browser now covers browser and UMD testing, so remove what it
replaced:
- root vitest.browser.config.mts / vitest.umd.config.mts,
  scripts/run-browser-tests.js, scripts/run-umd-tests.js,
  scripts/patch-vitest-viewport.js and vitest/umd-plugin.ts
- the test-browser* / test-umd* root scripts, and the @vitest/browser,
  browserstack-local and webdriverio root devDependencies (including the
  optional-peer tree npm would otherwise keep in the lockfile)
- the commented-out cross-browser CI job

tests/browser no longer borrows from the root vitest/ folder: the request
logger, console-capture plugin (merged into the local one) and
public/console-capture.js move into it, and the UMD bundle is copied to
tests/browser/public/dist.

Karma leftovers: delete lib/index.browser.umdtests.js (dead; its imports no
longer exist), the *.umdtests.js ignore patterns, and the BROWSER_STACK_*
env var fallbacks.

Comments and docs describe the current setup instead of comparing it with
the removed one; vitest3-compat.setup.ts is now restore-all-mocks.setup.ts.
The root README points browser testing at tests/browser.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 77.513%. remained the same — raju/remove-old-browser-tests into master

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues remain for the browser-test consolidation.

No open issues 🎉

What changed in this PR

Completes the browser-test migration from #1186 by removing the superseded root setup and consolidating test support under tests/browser. No SDK runtime code changes.

Changes:

  • Removes obsolete browser/UMD runners, configs, dependencies, and Karma leftovers.
  • Moves logging utilities and public assets into tests/browser, including the UMD bundle destination.
  • Updates testing documentation and comments to describe the current setup.
File Description
vitest/​umd-plugin.ts Deletes the obsolete root UMD plugin.
vitest/​console-capture-plugin.ts Deletes the superseded root console-capture plugin.
vitest.umd.config.mts Deletes the old root UMD configuration.
vitest.browser.config.mts Deletes the old root browser configuration.
tsconfig.spec.json Removes the obsolete UMD test exclusion.
tsconfig.json Removes the obsolete UMD test exclusion.
tests/​browser/​vitest.umd.config.mts Updates the bundle-location comment.
tests/​browser/​vitest.shared.mts Uses local assets and renamed setup; removes legacy credential fallbacks.
tests/​browser/​vitest.browser.config.mts Imports the request logger locally.
tests/​browser/​umd-plugin.ts Updates comments for the current setup.
tests/​browser/​run.js Copies the UMD bundle locally and removes legacy credential fallbacks.
tests/​browser/​restore-all-mocks.setup.ts Renames the mock-reset setup and clarifies comments.
tests/​browser/​request-logger-plugin.ts Relocates request logging into the browser project.
tests/​browser/​README.md Documents current commands, environment variables, and setup.
tests/​browser/​public/​console-capture.js Relocates the browser console-capture script.
tests/​browser/​package.json Updates the project description.
tests/​browser/​legacy-polyfills-plugin.ts Removes historical comparisons from comments.
tests/​browser/​console-capture-plugin.ts Implements the logging endpoint locally while retaining script injection.
scripts/​run-umd-tests.js Deletes the obsolete UMD runner.
scripts/​run-browser-tests.js Deletes the obsolete browser runner.
scripts/​platform-utils.js Removes the legacy UMD test exclusion.
scripts/​patch-vitest-viewport.js Deletes the obsolete viewport workaround.
README.md Directs contributors to tests/browser.
package.json Removes root browser/UMD scripts and dependencies.
package-lock.json Prunes obsolete dependencies and updates Babel runtime.
lib/​index.browser.umdtests.js Deletes unused Karma-era UMD tests.
.platform-isolation.config.js Removes the legacy UMD test exclusion.
.github/​workflows/​javascript.yml Removes a commented-out job and updates setup comments.
.eslintignore Removes the obsolete UMD test ignore pattern.

Review effort: Balanced

@raju-opti
Raju Ahmed (raju-opti) merged commit 241c9c9 into master Nov 9, 2026
26 of 28 checks passed
@raju-opti
Raju Ahmed (raju-opti) deleted the raju/remove-old-browser-tests branch November 9, 2026 15:17
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.

4 participants