Repository navigation
🔥 Remove Karma (configuration, dependencies and Karma-only test helpers) - #5142
Draft
thomas-lebeau wants to merge 2 commits into
Draft
thomas-lebeau wants to merge 2 commits into
thomas-lebeau wants to merge 2 commits into
Conversation
thomas-lebeau
added this pull request to stack #5137
October 14, 2026 14:53
Bundles Sizes Evolution
|
|
✅ All CI checks and tests passed. 🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: aa33c28 | Docs | View more details | Give us feedback! |
3 of 5 tasks
thomas-lebeau
force-pushed
the
thomas.lebeau/remove-karma
branch
from
October 15, 2026 14:37
2702bc3 to
e6dae91
Compare
Unit tests (`unit`) and BrowserStack unit tests (`unit-bs`) now run on Vitest: remove what was only used by Karma. - karma.base.conf.js, karma.bs.conf.js, the Karma reporter plugins and the globalThis / Object.hasOwn polyfill files - karma*, swc-loader and @swc/core (only used to transpile dependencies for Karma) dependencies, and their LICENSE-3rdparty.csv entries - the karma-webpack update pins in renovate.json and dependabot.yml - stale Karma mentions in docs and comments
…iases The Karma versions of the test helpers are dead code now: replace them with their Vitest implementations and remove the aliases redirecting to the copies in test/unit-vitest. - registerCleanupTask: runs tasks with `onTestFinished` - getCurrentJasmineSpec: tracked from forEach.ts (run for every test file) - disableJasmineUncaughtExceptionTracking: Vitest-compatible listeners - allJsonSchemas: `import.meta.glob` instead of webpack's `require.context` (no more JS + d.ts pair) - vitest declared as a devDependency of @datadog/browser-core, which now imports it in test helpers
thomas-lebeau
force-pushed
the
thomas.lebeau/remove-karma
branch
from
October 15, 2026 15:55
e6dae91 to
aa33c28
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Karma is deprecated (RUM-8075). With #5135 (
unit) and #5136 (unit-bs), all unit tests run on Vitest, so the Karma setup is now unused. Stacked on #5136.Changes
Removes what was only used by Karma:
test/unit/karma.base.conf.js,test/unit/karma.bs.conf.jsjasmineSeedReporterPlugin.js,karmaDuplicateTestNameReporterPlugin.js,karmaSkippedFailedReporterPlugin.js,karmaUnexpectedErrorLogReporterPlugin.js) and theglobalThis/Object.hasOwnpolyfill fileskarma,karma-browserstack-launcher,karma-jasmine,karma-junit-reporter,karma-sourcemap-loader,karma-spec-reporter,karma-webpack, plusswc-loaderand@swc/core(added in ✨ [RUM-5500] React-router v7 support #3299 to transpile dependencies for Karma; nothing else uses them), and theirLICENSE-3rdparty.csventrieskarma-webpackupdate pins inrenovate.jsonand.github/dependabot.yml(RUM-3130)Kept:
test/unit/browsers.conf.ts(BrowserStack browser matrix, used by the Vitest BrowserStack config), andjasmine-core/@types/jasmine/eslint-plugin-jasmine(used by the Jasmine compatibility shim until specs are migrated to the Vitest API).Merges the test helpers that had a Karma version and a Vitest copy (selected through aliases in the Vitest config) into a single Vitest implementation, and drops the aliases:
registerCleanupTaskruns tasks withonTestFinishedgetCurrentJasmineSpecis tracked fromforEach.ts(a setup file run for every test file)disableJasmineUncaughtExceptionTrackinguses Vitest-compatible listenersallJsonSchemasusesimport.meta.globinstead of webpack'srequire.context(no more JS +.d.tspair)vitestis declared as a devDependency of@datadog/browser-core, whose test helpers now import itFollow-up: migrate specs to the Vitest API (then drop the Jasmine shim).
Test instructions
Checklist