Skip to content

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

Open
Raju Ahmed (raju-opti) wants to merge 1 commit into
masterfrom
raju/remove-old-browser-tests
Open

Raju Ahmed (raju-opti) wants to merge 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

This branch has not been deployed

No deployments
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