Q re: - Day20 Documentation
I am trying to understand what this test is looking for:
if (firstRequest.request.header) {
firstRequest.request.header.forEach( (header) => {
pm.expect(header.description, 'check header description').to.exist
})
}
Hereās the documentation:
ā¦I get FAIL Documentation added correctly | AssertionError: check header description: expected undefined to exist.
I canāt seem to figure out if the test is looking for header info, if so how to write it, or what āundefined to existā meansā¦
Thanks
Do you have a description for a request header that you have added? That should only run that check if you have added a header to the request.
Can you share an image of the Headers?
yea, sorry,
I really donāt understand this.
I thought the test was for an existing header, that I thought I entered using CURL (BLUE)
RED is just there - I canāt add/change it
YELLOW is the header of the call.
Because you have a Header in there (the Accept one at the botton), which is not the auto generated ones, it requires a description (the column next to the vakue).
WOW - you did it again Danny! IDK if I would have figured that out!
Making the description mandatory is really smart documentation-wise!
Thanks again!
system
(system)
Closed
January 10, 2024, 3:54pm
6
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.