Make lastCommit and changedFilesWithAncestor work through config#5476
Make lastCommit and changedFilesWithAncestor work through config#5476cpojer merged 1 commit intojestjs:masterfrom mjesun:changed-files-with-ancestor
Conversation
| ); | ||
| }); | ||
|
|
||
| it('sets onlyChanged if lastCommit is specified', () => { |
There was a problem hiding this comment.
This test case is removed because it does not apply anymore; the logic has been moved to normalize in jest-config. Which, in turn, it's the right place to have it (argv should be read-only).
| ); | ||
| } | ||
|
|
||
| for (const key of [ |
There was a problem hiding this comment.
Does it make sense to extract these special options? https://github.com/facebook/jest/pull/5476/files#diff-a6aea6252dbe0924a79aabb9b1fb581dL23
|
I really like this change 👍 |
Codecov Report
@@ Coverage Diff @@
## master #5476 +/- ##
=========================================
+ Coverage 61.42% 62.23% +0.8%
=========================================
Files 213 205 -8
Lines 7057 6935 -122
Branches 3 4 +1
=========================================
- Hits 4335 4316 -19
+ Misses 2721 2618 -103
Partials 1 1
Continue to review full report at Codecov.
|
|
It'd be nice to get a +1 on that one 🙃 |
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This change makes
changedFilesWithAncestorandlastCommitwork both via configuration and via CLI. Before that, they could only be used in CLI, and adding them to the configuration (eitherpackage.jsonor a separate JSON file) will cause them either to be ignored or complain as an invalid parameter. This required to move as well some of the logic deeper into configuration normalization.On the other side, I also improved the ancestor logic for Mercurial. Instead of just using the last commit, it will try to find the root of the branch. The reason for the change is that it is extremely confusing to see tests getting/not-getting executed when your branch has a bunch of stacked commits.