Skip to content

feat(schematics): migrate schematics tests to Vitest#5134

Open
timdeschryver wants to merge 3 commits intomainfrom
timdeschryver/issue-5098-ngrx-schematics-migrate-schematics-test-78a7a0
Open

feat(schematics): migrate schematics tests to Vitest#5134
timdeschryver wants to merge 3 commits intomainfrom
timdeschryver/issue-5098-ngrx-schematics-migrate-schematics-test-78a7a0

Conversation

@timdeschryver
Copy link
Copy Markdown
Member

Closes #5098

Changes

Migrates the @ngrx/schematics test suite from Jest to Vitest, following the same pattern established by @ngrx/effects.

Files changed

  • vitest.config.ts (new) — Vitest config using @analogjs/vite-plugin-angular, nxViteTsPaths, jsdom environment, forks pool; includes src/**/*.spec.ts and migrations/**/*.spec.ts
  • test-setup.ts — replaced jest-preset-angular zone setup with the standard Angular Vitest setup (@analogjs/vitest-angular/setup-zone + TestBed.initTestEnvironment)
  • tsconfig.spec.json — updated module to es2022, types to vitest/globals
  • project.json — changed test executor from @nx/jest:jest to @analogjs/vitest-angular:test
  • jest.config.ts — removed (no longer needed)
  • nx.json — added vitest.config.[jt]s to production namedInput exclusions

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 3, 2026

Deploy Preview for ngrx-io ready!

Name Link
🔨 Latest commit 15eb9ef
🔍 Latest deploy log https://app.netlify.com/projects/ngrx-io/deploys/69d15a6f7897b1000844483f
😎 Deploy Preview https://deploy-preview-5134--ngrx-io.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

- Replace jest.config.ts with vitest.config.ts
- Update project.json to use @nx/vite:test executor
- Update tsconfig.spec.json: module es2022, vitest/globals types
- Simplify test-setup.ts (remove jest-preset-angular zone setup)
- Update nx.json production namedInputs to exclude vitest.config

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@timdeschryver timdeschryver force-pushed the timdeschryver/issue-5098-ngrx-schematics-migrate-schematics-test-78a7a0 branch from ee145f7 to 6178330 Compare April 3, 2026 22:16
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.

@ngrx/schematics: Migrate Schematics Tests to Vitest

1 participant