Skip to content

Migrate devextreme-angular wrapper tests to vitest - #36262

Draft
GoodDayForSurf wants to merge 6 commits into
DevExpress:mainfrom
GoodDayForSurf:main_replaceKarma_by_vitest
Draft

GoodDayForSurf wants to merge 6 commits into
DevExpress:mainfrom
GoodDayForSurf:main_replaceKarma_by_vitest

Conversation

@GoodDayForSurf

Copy link
Copy Markdown
Contributor

No description provided.

@GoodDayForSurf GoodDayForSurf self-assigned this Nov 11, 2026

Copilot AI 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.

🟡 Changes recommended

The Vite runtime path does not emit constructor metadata, preventing Angular from resolving JIT test dependencies and stopping affected tests before they reach their assertions.

1 open issue
1 file not reviewed
  • pnpm-lock.yaml: Generated file
What changed in this PR

Migrates DevExtreme’s Angular wrapper tests from Karma/Jasmine to Vitest browser mode, with Nx targets for client, server, hydration, and zone/zoneless environments.

Changes:

  • Adds Vitest browser configuration and Angular test setup.
  • Converts spies, timers, asynchronous tests, and typings to Vitest.
  • Removes Karma/Webpack test infrastructure and updates dependencies and Nx targets.
File Description
pnpm-lock.yaml Updates test dependencies and resolved packages.
packages/​nx-infra-plugin/​src/​executors/​karma-multi-env/​schema.ts Removes Karma executor option types.
packages/​nx-infra-plugin/​src/​executors/​karma-multi-env/​schema.json Removes Karma executor validation schema.
packages/​nx-infra-plugin/​src/​executors/​karma-multi-env/​schema.d.ts Removes Karma executor declarations.
packages/​nx-infra-plugin/​src/​executors/​karma-multi-env/​karma.types.ts Removes Karma environment mappings.
packages/​nx-infra-plugin/​src/​executors/​karma-multi-env/​karma-utils.ts Removes Karma loading utilities.
packages/​nx-infra-plugin/​src/​executors/​karma-multi-env/​karma-multi-env.impl.ts Removes multi-environment Karma execution.
packages/​nx-infra-plugin/​src/​executors/​karma-multi-env/​executor.ts Removes the Karma executor entry point.
packages/​nx-infra-plugin/​src/​executors/​karma-multi-env/​executor.spec.ts Removes retired executor tests.
packages/​nx-infra-plugin/​package.json Removes the Karma peer dependency.
packages/​nx-infra-plugin/​executors.json Unregisters the Karma executor.
packages/​devextreme-angular/​webpack.test.js Removes Webpack test configuration.
packages/​devextreme-angular/​vitest.config.mts Configures browser projects, package resolution, and reports.
packages/​devextreme-angular/​tsconfig.tests.json Includes Vitest setup in type checking.
packages/​devextreme-angular/​tsconfig.json Replaces Jasmine globals with Vitest typings.
packages/​devextreme-angular/​tests/​vitest/​zone.ts Loads Zone.js testing support.
packages/​devextreme-angular/​tests/​vitest/​setup.zoneless.ts Initializes zoneless browser tests.
packages/​devextreme-angular/​tests/​vitest/​setup.server.ts Initializes zone-based server tests.
packages/​devextreme-angular/​tests/​vitest/​setup.server-zoneless.ts Initializes zoneless server tests.
packages/​devextreme-angular/​tests/​vitest/​setup.client.ts Initializes zone-based browser tests.
packages/​devextreme-angular/​tests/​vitest/​init-test-bed.ts Centralizes Angular test environment initialization.
packages/​devextreme-angular/​tests/​vitest/​common.ts Loads reflection support and Angular’s compiler.
packages/​devextreme-angular/​tests/​src/​zone-modes/​change-detection.spec.ts Migrates change-detection spies.
packages/​devextreme-angular/​tests/​src/​ui/​tag-box.spec.ts Migrates event-handler spies.
packages/​devextreme-angular/​tests/​src/​ui/​select-box.spec.ts Removes obsolete assertion type suppressions.
packages/​devextreme-angular/​tests/​src/​ui/​memory-leak.spec.ts Uses Vitest suite timeout configuration.
packages/​devextreme-angular/​tests/​src/​ui/​list.spec.ts Migrates spies and call-history assertions.
packages/​devextreme-angular/​tests/​src/​ui/​form.spec.ts Migrates option-reset spies.
packages/​devextreme-angular/​tests/​src/​ui/​data-grid.spec.ts Migrates timers, spies, asynchronous tests, and timeouts.
packages/​devextreme-angular/​tests/​src/​ui/​data-grid.legacy.spec.ts Migrates legacy grid tests to Vitest APIs.
packages/​devextreme-angular/​tests/​src/​ui/​custom-value-accessor-implementation.spec.ts Migrates the form-change callback mock.
packages/​devextreme-angular/​tests/​src/​ui/​chart.spec.ts Migrates chart spies and timers.
packages/​devextreme-angular/​tests/​src/​server/​hydration.spec.ts Migrates console spies and recreates them per test.
packages/​devextreme-angular/​tests/​src/​http/​ajax.spec.ts Migrates HTTP mocks, asynchronous tests, and timeout settings.
packages/​devextreme-angular/​tests/​src/​http/​ajax-bootstrap-interceptors.spec.ts Migrates interceptor spies and asynchronous tests.
packages/​devextreme-angular/​tests/​src/​helpers/​zone-mode.ts Uses Vitest’s conditional test skipping.
packages/​devextreme-angular/​tests/​src/​core/​nested-option.spec.ts Migrates nested-option callback spies.
packages/​devextreme-angular/​tests/​src/​core/​events-strategy.spec.ts Replaces Jasmine event-handler mocks.
packages/​devextreme-angular/​tests/​src/​core/​deprecated-config-warning.spec.ts Migrates warning spies and mock typings.
packages/​devextreme-angular/​tests/​src/​core/​component.spec.ts Migrates component event and lifecycle spies.
packages/​devextreme-angular/​tests/​src/​core/​angular-integration.spec.ts Migrates the integration injection spy.
packages/​devextreme-angular/​project.json Replaces Karma targets with Vitest and separate type checking.
packages/​devextreme-angular/​package.json Replaces legacy test dependencies with Vitest and Playwright.
packages/​devextreme-angular/​karma.zoneless.test.shim.js Removes the zoneless browser bootstrap.
packages/​devextreme-angular/​karma.zoneless-testing.module.js Removes the Karma zoneless testing module.
packages/​devextreme-angular/​karma.zone.test.shim.js Removes the zone-mode test bootstrap.
packages/​devextreme-angular/​karma.zone-testing.module.js Removes the Karma zone testing module.
packages/​devextreme-angular/​karma.zone-polyfills.test.shim.js Removes the Karma Zone.js bootstrap.
packages/​devextreme-angular/​karma.test.shim.js Removes the client test bootstrap.
packages/​devextreme-angular/​karma.server.test.shim.js Removes the server test bootstrap.
packages/​devextreme-angular/​karma.server-zoneless.test.shim.js Removes the zoneless server bootstrap.
packages/​devextreme-angular/​karma.hydration.test.shim.js Removes the hydration test bootstrap.
packages/​devextreme-angular/​karma.hydration-zoneless.test.shim.js Removes the zoneless hydration bootstrap.
packages/​devextreme-angular/​karma.conf.js Removes Karma browser and reporter configuration.
packages/​devextreme-angular/​karma.common.test.shim.js Removes shared Karma initialization and polyfills.
packages/​devextreme-angular/​.gitignore Ignores Vitest’s XML report.
.github/​copilot-instructions.md Updates the documented Angular test framework.

Review effort: Balanced

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