I am trying to check if a string exists with
pm.expect(jsonData[0]["name"]).to.match('abagnale');
but I am getting
TypeError: e.exec is not a function
The error message is a little generic but in this case it can be fixed by using a regex
to.match(/abagnale/)
instead of a string
to.match('abagnale')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With