Skip to content

describe.only is ignored when running Vitest via ng test #32398

@jackit-y

Description

@jackit-y

Command

test

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

Description

When using Vitest as the test runner and executing tests via ng test, describe.only is ignored and all test suites are executed.

Expected behavior

Only the test suite marked with describe.only should be executed.

Actual behavior

All test suites are executed.

Minimal Reproduction

  1. Configure an Angular project to use Vitest as the test runner.
  2. In any .spec.ts file, mark a test suite with describe.only.
  3. Run: ng test

Exception or Error


Your Environment

Angular CLI       : 21.1.1
Angular           : 21.1.1
Node.js           : 24.11.1
Package Manager   : npm 11.6.2
Operating System  : win32 x64

┌───────────────────────────┬───────────────────┬───────────────────┐
│ Package                   │ Installed Version │ Requested Version │
├───────────────────────────┼───────────────────┼───────────────────┤
│ @angular/build            │ 21.1.1            │ ^21.1.1           │
│ @angular/cli              │ 21.1.1            │ ^21.1.1           │
│ @angular/common           │ 21.1.1            │ ^21.1.0           │
│ @angular/compiler         │ 21.1.1            │ ^21.1.0           │
│ @angular/compiler-cli     │ 21.1.1            │ ^21.1.0           │
│ @angular/core             │ 21.1.1            │ ^21.1.0           │
│ @angular/forms            │ 21.1.1            │ ^21.1.0           │
│ @angular/platform-browser │ 21.1.1            │ ^21.1.0           │
│ @angular/router           │ 21.1.1            │ ^21.1.0           │
│ rxjs                      │ 7.8.2             │ ~7.8.0            │
│ typescript                │ 5.9.3             │ ~5.9.2            │
│ vitest                    │ 4.0.18            │ ^4.0.18           │
└───────────────────────────┴───────────────────┴───────────────────┘

Anything else relevant?

No response

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