-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Description
Command
test
Description
Considering the way unit-test builder works, not all Vitest config options are available.
Some options are explicitly detected and the user is warned:
angular-cli/packages/angular/build/src/builders/unit-test/runners/vitest/plugins.ts
Line 81 in 7206032
| if (testConfig?.projects?.length) { |
But there are also some options or configurations that could cause surprising issues.
For example, as of 21.0.0-rc.3, isolate: false can break the tests in browser mode.
Describe the solution you'd like
It would be nice if the option was marked as experimental or at least in dev preview and/or if it would come with a warning.
It would set the expectations right and leave some time for the Angular team and the community to document or fix the rough edges.
Describe alternatives you've considered
In the future @angular/build could either:
- expose a
defineAngularVitestConfigfunction that only allows the subset of Vitest options that are known to be supported by the CLI. - expose a Vitest plugin and give full control for most advanced configs and use cases