https://cypress.io logo
Cypress.Commands.overwriteQuery: how to check if t...
# i-need-help
k
I’m trying to overwrite the
.contains()
command on
Cypress v12.6.0
with the following requirements: - search within the parent selector if the command has
prevSubject
, e.g.
cy.get(selector).contains(content)
- if the command doesn’t have
prevSubject
-> use default selector. How can I check if
.contains()
has a prevSubject and get its value? Thanks in advance!