question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ng test --findRelatedTests file1 file2 does not work as expected

See original GitHub issue

Describe the Bug

Currently, ng test --findRelatedTests works correctly when passing 1 file only: ng test --findRelatedTests file1.ts

When passing more than 1 files, the rest of the files are treated like CLI options: ng test --findRelatedTests file1 file2 Here, file2 is considered project name (as in --project): image

Expected Behavior

Both files should be taken into account when checking for related tests: image

Environment

@angular-builders/custom-webpack”: “^13.0”, “@angular-builders/jest”: “^13.0”, “jest”: “^27.4.2”, “@types/jest”: “^27.0.3”,

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
just-jebcommented, Dec 6, 2021

Cool, so I’m graduating it to release.

1reaction
just-jebcommented, Dec 3, 2021

It’s enough, thank you. Just haven’t had time to tackle it yet.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ng test <project> --find-related-tests doesn't seem to work #1023
On git commits I'd like to be able to run only related tests, using husky and lint-staged. The problem is, when I run:...
Read more >
Jest --findRelatedTests not finding related test - Stack Overflow
I ran into this issue and found it was because I was using the roots option in my jest configuration and was only...
Read more >
7.1. Introduction to if
The TEST-COMMAND list is executed, and if its return status is zero, ... has been changed more recently than FILE2, or if FILE1...
Read more >
Run jest for unit tests of modified files only | by SunCommander
In this article, you will learn how to run Jest for modified files only in a Pull Request. This can be done using...
Read more >
lint-staged - npm
This config will execute your-cmd with the list of currently staged files passed as arguments. So, considering you did git add file1.ext file2....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found