I am trying to check for current location in cypress. I want to check the url should have string register/
followed by numbers
of any digit.
I am doing cy.url().should('match', new RegExp('.+?register\/\d+'))
URL = http://localhost:8888/wachigroup/#!/register/82
Regex = new RegExp('.+?register\/\d+')
I also tried the regex here https://regex101.com/r/1HxZq3/1/ which seems work fine.
BUT It is failing in cypress as the error below. Is there anything I am doing wrong ?