You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Command
test
Description
First of all, I support the initiative to add
vitest
to Angular. Especially sincevite
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:
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
.You could add a plugin (like
@analogjs/vite-plugin-angular
)You could also provide an angular
defineConfig
. Then you can strongly type the options and include/exclude ones that make sense for angular.The text was updated successfully, but these errors were encountered: