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
{{ message }}
Repository navigation
Commit 5452b1a
Browse filesBrowse the repository at this point in the historyBrowse files
feat(@angular/build): add runnerArgs option to unit-test builder
The unit-test builder now supports a `runnerArgs` option that provides
additional command line arguments to the Vitest runner. For example,
`ng test --runner-args=--update` updates existing snapshots and
`ng test --runner-args=--bail=1` stops the run after the first failure.
The option can also be configured within the `angular.json` file.
The arguments are parsed with the Vitest command line parser and then
validated against a list of supported Vitest options. The Vitest parser
accepts unknown options, command names, and test file filters without
error. The validation ensures that a misspelled or unsupported argument
fails the build with a descriptive message instead of being ignored.
Vitest options with an equivalent builder option, such as `--reporter`
and `--coverage`, are rejected with a reference to the builder option.
The initially supported Vitest options are `--allowOnly`, `--bail`,
`--disableConsoleIntercept`, `--expandSnapshotDiff`, `--maxWorkers`,
`--printConsoleTrace`, `--retry`, `--sequence.seed`,
`--sequence.shuffle`, `--shard`, `--testTimeout`, and `--update`.
The supported options take precedence over a Vitest configuration file
but not over the other builder options. The option is not available for
the Karma runner.
0 commit comments