@cypress/grep prints warning if nothing is being grepped #24568
Labels
E2E
Issue related to end-to-end testing
npm: @cypress/grep
@cypress/grep package issues
Triaged
Issue has been routed to backlog. This is not a commitment to have it prioritized by the team.
Current behavior
grepFilterSpecs
feature (as described in the README).Cypress prints the warning:
Desired behavior
Cypress does not print any warning.
Cause of the bug:
greppedSpecs
variable is initialized to an empty array here:cypress/npm/grep/src/plugin.js
Line 78 in 12f9e8a
grep
orgrepTags
is defined. That means that it remains an empty array if no grepping is being done.cypress/npm/grep/src/plugin.js
Line 142 in 12f9e8a
else
here:cypress/npm/grep/src/plugin.js
Line 144 in 12f9e8a
If we did no grepping at all, we still go into that else and print a warning. That else should probably be changed to:
Test code to reproduce
See analysis above.
Cypress Version
10.10.0
Node version
N/A
Operating System
N/A
Debug Logs
No response
Other
No response
The text was updated successfully, but these errors were encountered: