-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
cy.contains will throw unrecognized expression error if it tries to match against regex containing single quotation mark #8626
Comments
I can recreate this issue in 6.1.0 Reproducible example
it('test', () => {
cy.contains(/\'/)
})
This is broke all the way back to 3.6.1, but the expression was different back then in the error:
|
The code for this is done in cypress-io/cypress#14311, but has yet to be released. |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Current behavior:
cy.contains will throw invalid expression error if you try to match a regex containing a quotation
Desired behavior:
cy.contains should be able to handle any valid regular expression
Test code to reproduce
Versions
Cypress 5.1.0
Mac OS Catalina
chrome 85
The text was updated successfully, but these errors were encountered: