ng test --findRelatedTests file1 file2 does not work as expected
See original GitHub issueDescribe 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):
Expected Behavior
Both files should be taken into account when checking for related tests:
Environment
“@angular-builders/custom-webpack”: “^13.0”, “@angular-builders/jest”: “^13.0”, “jest”: “^27.4.2”, “@types/jest”: “^27.0.3”,
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (6 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Cool, so I’m graduating it to release.
It’s enough, thank you. Just haven’t had time to tackle it yet.