Skip to content

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

Merged
markostanimirovic merged 5 commits intomainfrom
timdeschryver/issue-5098-ngrx-schematics-migrate-schematics-test-78a7a0
Apr 16, 2026
Merged

refactor(schematics): migrate schematics tests to Vitest#5134
markostanimirovic merged 5 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 bde4dcf
🔍 Latest deploy log https://app.netlify.com/projects/ngrx-io/deploys/69dfd699b903e100088bc67e
😎 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 <[email protected]>
@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
@markostanimirovic markostanimirovic changed the title feat(schematics): migrate schematics tests to Vitest refactor(schematics): migrate schematics tests to Vitest Apr 16, 2026
@markostanimirovic markostanimirovic merged commit 346da2d into main Apr 16, 2026
10 checks passed
@markostanimirovic markostanimirovic deleted the timdeschryver/issue-5098-ngrx-schematics-migrate-schematics-test-78a7a0 branch April 16, 2026 23:32
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

3 participants