Skip to content

match is erroring when given a non regex value #58

@scottdavis

Description

@scottdavis

works: .get('.scroll').should("have.prop", 'scrollLeft').and('match', /^0$/)
errors: .get('.scroll').should("have.prop", 'scrollLeft').and('match', 0)

TypeError: t.exec is not a function
    at n.<anonymous> (http://localhost:2020/__cypress/static/js/vendor.js:239:8893)
    at n.require.register.n.exports.t.(anonymous function) (http://localhost:2020/__cypress/static/js/vendor.js:276:151)
    at n.<anonymous> (http://localhost:2020/__cypress/static/js/vendor.js:453:4980)
    at n.require.register.n.exports.t.(anonymous function) [as match] (http://localhost:2020/__cypress/static/js/vendor.js:422:122)
    at $Cypress.register.Cypress.addChildCommand.should.applyChainer (http://localhost:2020/__cypress/static/js/cypress.js:5417:34)
    at http://localhost:2020/__cypress/static/js/cypress.js:5448:24
    at Function.d.reduce.d.foldl.d.inject (http://localhost:2020/__cypress/static/js/vendor.js:27:8445)
    at http://localhost:2020/__cypress/static/js/cypress.js:5430:22
    at $Cypress.register.Cypress.addChildCommand.should (http://localhost:2020/__cypress/static/js/cypress.js:5453:32)
    at $Cy.<anonymous> (http://localhost:2020/__cypress/static/js/cypress.js:569:28)
    at $Cy.d.partial (http://localhost:2020/__cypress/static/js/vendor.js:27:14449)
    at $Cypress.extend.inject.$Cypress.Cy.sync.(anonymous function) (http://localhost:2020/__cypress/static/js/cypress.js:584:27)
    at $Cypress.register.Cypress.addChildCommand.and (http://localhost:2020/__cypress/static/js/cypress.js:5463:33)
    at $Cy.<anonymous> (http://localhost:2020/__cypress/static/js/cypress.js:569:28)
    at $Cy.d.partial (http://localhost:2020/__cypress/static/js/vendor.js:27:14449)
    at http://localhost:2020/__cypress/static/js/cypress.js:963:26

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions