-
Notifications
You must be signed in to change notification settings - Fork 3.3k
fix: Inverted tag and grep untagged #28256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
fix: Inverted tag and grep untagged #28256
Conversation
Caíque Coelho seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
|
Hey folks, could we have someone taking a look on this, please? 🙏 cc @ryanthemanuel @jennifer-shehane |
This PR has not had any activity in 180 days. If no activity is detected in the next 14 days, this PR will be closed. |
This PR has been closed due to inactivity |
Additional details
Problem: Improper Handling of Negative Tags in shouldTestRun
The shouldTestRun function needs to correctly interpret negative tags (e.g., -@burn). If it does not, then it might incorrectly determine that tests with the @burn tag should run when they should not, or it might exclude tests without any tags.
Fix: Refactor shouldTestRun to handle negative tags and grepUntagged with true
We have ensured that the shouldTestRun function (and any helper function like shouldTestRunTags it relies on) interprets negative tags correctly. This means if -@burn is passed, the function should return false for any test with the @burn tag and true for tests without the @burn tag. Also when passing grepUntagged as true now we analyze test by test whether it has a direct tag from the it block or inherits a tag from the describe block
Steps to test
All the following unit tests using
shouldTestRun
andshouldTestRunTags
methods should pass on the following filenpm/grep/cypress/e2e/unit.js