Is there a function similar to bodyContains but for headers?
Cenric opened this issue · 2 comments
Cenric commented
I am trying to expect a value in the header to contain certain text, something like
.expect('header', 'key', startsWith('value'))
but nothing seems to work. I see that there is a built in bodyContains function, was wondering how I could do this for running an expect on a header key/value as well?
H1Gdev commented
value
parameter is regular expression
.
.expect('header', 'key', /^value/))
I think this test will be helpful.
Cenric commented
Thank you so much, this helped a lot!