Unit test: Add reporter watermark configuration to angular.json

Open
#31,998 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
angular, typescript
Domain
cli, testing, tooling

Research direction

Start with angular.json unit-test options and vitest-base.config.ts, then run the repository's unit-test command to trace how options reach Vitest. Confirm the desired slow-test threshold setting is accepted through angular.json and that vitest-base.config.ts can be removed without losing the configuration.

Written by the indexing model from the issue text.

Description

angular/build:unit-test area: @angular/build feature feature: insufficient votes
Command

test

Description

After taking advantage of all the new Vitest unit test features in 21.0.0, there is only one configuration item left in the vitest-base.config.ts:

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

This is required since the Vitest's slowTestThreshold default of 300 ms is not adequate for extended test cases.

Ideally this configuration should be available through the angular.json configuration unit-test options, since it would allow the complete removal of the vitest-base.config.ts file.

Maybe follow the nomenclature that you introduced with "coverageWatermarks" and call it "reporterWatermark".

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Dominant language
TypeScript
Stars
27k
Forks
11.8k
Avg merge
16h 35m
Merged PRs (30d)
176

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from angular/angular-cli

All issues in angular/angular-cli

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.