In my Cypress tests, I need to verify that a value is in a GUID format.
Here's an example of the value returned: fbb4f73c-0e3b-4fda-ad0a-81a1b8a8c72f
I've tried asserting using a RegEx below:
resultString = Regex.Replace(subjectString,
"(?im)^[{(]?[0-9A-F]{8}[-]?(?:[0-9A-F]{4}[-]?){3}[0-9A-F]{12}[)}]?$",
"'$0'");
expect(myXhr.response.body.Id).should('contain', /resultString/)
But I get the following error message:
Invalid Chai property: should