Skip to content

@cypress/grep v6 doesn't respect tag negation #33358

@joshuajtward

Description

@joshuajtward

Current behavior

Between versions 5.1.0 and 6.0.0 of @cypress/grep the negative tags (i.e. using -@myTag to exclude tests) has stopped working, and tagged tests are no longer being excluded

Desired behavior

Tag exclusion works as intended

Test code to reproduce

Add it('should not run', { tags: ['@tag']}, () => { expect(true).to.equal(false) }) to a new file

Run cypress with `CYPRESS_grepFilterSpecs=true CYPRESS_grepOmitFiltered=true CYPRESS_grepTags="-@tag"

The test should not be executed

This behavior is broken between 5.1.0 and 6.0.0

Cypress Version

15.10.0

Debug Logs

Other

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions