cypress-grep
cypress-grep copied to clipboard
Unexpected behavior of explicit not tag when used alone
With the new explicit-not tag from #122, I expected to be able to do something like this in our CI: --env grepTags='$VAR --@flaky', where VAR is a variable that depends on context and could be, for example, @smoke if I want to run all the smoke tests (except the flaky ones), or empty if I want to run all the tests (except the flaky ones).
@smoke --@flaky works great. But just --@flaky on its own does not exclude the flaky tests. It runs all the tests.
I can do $VAR @non-existent --@flaky or $VAR -@flaky --@flaky as a work-around to make it work.
I guess this is because ORS_filtered in https://github.com/cypress-io/cypress-grep/blob/1a2bd3449819f71f46ba1e49a7db90081b2d799f/src/utils.js#L80 is empty, so the explicitNotTags end up not being added to anything. Should they be?