Content-Length: 206829 | pFad | http://github.com/angular/angular-cli/issues/30429

F2 [@angular/build:unit-test][vitest] Configurable vitest · Issue #30429 · angular/angular-cli · GitHub
Skip to content

[@angular/build:unit-test][vitest] Configurable vitest #30429

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
joergbaier opened this issue May 30, 2025 · 0 comments
Open

[@angular/build:unit-test][vitest] Configurable vitest #30429

joergbaier opened this issue May 30, 2025 · 0 comments

Comments

@joergbaier
Copy link

Command

test

Description

First of all, I support the initiative to add vitest to Angular. Especially since vite is already used for build & serve.

Early feedback for vitest in Angular v20. Based on a quick browse of packages/angular/build/src/builders/unit-test/builder.ts there doesn't seem to be a way to pass configuration settings.

For this to be even slightly usable, you would need to set vitest options such as:

  • timeouts
  • setupFiles
  • coverage (specify lcov reporter)

Describe the solution you'd like

One option is letting people pass vitest options in angular.json and doing a deep object merge.

Describe alternatives you've considered

Personally I would rather see less obfuscation... let people have a vitest.config.ts.

import { defineConfig } from "vitest/config";

export default defineConfig({
  test: {}
});

You could add a plugin (like @analogjs/vite-plugin-angular)

You could also provide an angulardefineConfig. Then you can strongly type the options and include/exclude ones that make sense for angular.

import { defineConfig } from "@angular/vitest";

export default defineConfig({ ... });
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

No branches or pull requests

1 participant








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/angular/angular-cli/issues/30429

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy