Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Vitest]: lowTestThreshold should be configurable #31004

Closed as duplicate of#30429
Closed as duplicate of#30429
@wein2011

Description

Command

test

Description

Vitest's slowTestThreshold of 300 ms is not adequate for extended test cases.

Ideally this configuration should be available through the angular.json configuration.

Describe the solution you'd like

An additional configuration in the angular.json configuration would work well:

"test": {
 "builder": "@angular/build:unit-test",
 "options": {
 "slowTestThreshold ": 10000
 }
}

Describe alternatives you've considered

As a workaround, we added the slowTestThreshold configuration to @angular/build/src/builders/unit-test/builder.js.

instance ??= await startVitest('test', undefined /* cliFilters */, {
 // Disable configuration file resolution/loading
 config: false,
 root: workspaceRoot,
 project: ['base', projectName],
 name: 'base',
 include: [],
 // Added slowTestThreshold for testing
 slowTestThreshold: 10000,
 reporters: normalizedOptions.reporters ?? ['default'],
};

However, this should really be using the potential normalizedOptions.slowTestThreshold configuration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /