Skip to content

Angular 20: --findRelatedTests doesn't work #2150

@marapper

Description

@marapper

Describe the Bug

Comma-separated --find-related-tests does not transform to space separated --findRelatedTests as expected by Jesthttps://jestjs.io/docs/cli#--findrelatedtests-spaceseparatedlistofsourcefiles

Minimal Reproduction

$ ng test --find-related-tests file1,file2

Execute jest with the following arg:

'--findRelatedTests',
  'file1,file2',

If --show-config used, there is same issue is show in a config:

"testPathPatterns": [
      "src/app/components/form-fields/shared/fields.validators.ts,src/app/components/dib-input-select/dib-input-select.component2.ts"
    ],

Jest returns an error after line

Pattern: file1,file2 - 0 matches

Jest uses nonFlagArray to collect all files from CLI run.

Expected Behavior

Specific file paths should be passed correctly to Jest and be ignored if one of the paths doesn't exist

Environment


Libs
- @angular/core version: X.Y.Z
- @angular-builders/jest version: ~21.0.0

For Tooling issues:
- Node version: 24
- Platform:  Mac

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions