Easier way to provide disableConsoleIntercept to ng test with vitest
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- angular, typescript
Research direction
Start with the ng test command's argument parsing and its Vitest integration, then reproduce the reported command-line errors. Done means arguments after -- reach Vitest without schema validation errors, including --disableConsoleIntercept, with coverage in the relevant command tests.
Written by the indexing model from the issue text.
Description
Command
test
Description
Vitest by default captures the console output, which reduces the ways available to debug tests.
However, there is no direct equivalent option on ng test to enable logging and no direct way to pass the --disableConsoleIntercept flag to the underlying vitest command.
Attempting to run ng test --disableConsoleIntercept
Error: Unknown argument: disableConsoleIntercept
Attempting to run ng test -- --disableConsoleIntercept results in
Option '--' has been specified multiple times. The value '--disableConsoleIntercept' will be used.
Error: Schema validation failed with the following errors:
Data path "" must NOT have additional properties().
ELIFECYCLE Test failed. See above for more details.
Instead it seems like you would have to create a custom vitest configuration, with several other properties, and then provide that in angular.json which is rather heavy handed for simple one-time debugging.
Describe the solution you'd like
Simple forwarding of arguments ng test -- --disableConsoleIntercept which would pass the arguments to the underlying vitest command.
Describe alternatives you've considered
- Support for this flag on the ng test command directly (though this is not a generic argument for all test types)
- Support for some "forwardedArgs" flag on ng test that allows for flags to be forwarded
- Dominant language
- TypeScript
- Stars
- 27k
- Forks
- 11.8k
- Avg merge
- 16h 35m
- Merged PRs (30d)
- 176
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from angular/angular-cli
-
area: @angular/build gemini-triaged
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
angular/angular-cli#33955 ·
-
area: @angular/cli gemini-triaged
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
angular/angular-cli#33055 · 1 comment · 3 reactions ·
-
area: @angular/build gemini-triaged
Difficulty 4/5 3-5 days Newbie friendliness 72/100
angular/angular-cli#34137 ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34131 · 1 assignee ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34130 · 1 assignee ·
All issues in angular/angular-cli
Similar issues
-
Browser Waiting for: Product Owner
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
getsentry/sentry-javascript#24577 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
agilepathway/label-checker#640 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
copse-dev/agent-pane#2953 ·
-
agentic-workflows
Difficulty 1/5 Under an hour Newbie friendliness 85/100
githubnext/rig#534 ·
-
automation missing-model model-sync provider:pioneer
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
anomalyco/models.dev#7701 ·