Search code examples
node.jscodeceptjs

Displaying response in Codeceptjs - API


I'm not sure if I'm supposed to ask this question somewhere else. That said, please excuse me if I'm using this site wrong.

As for my question, is there a way on how to display the response of the API using codeceptjs? I've recently learned about the 'I.say()', however I'm not quite sure how to get the proper response and actually put it in there.

Thanks in advance.


Solution

  • I found the answer.

    Basically, I added the 'async' in the Scenario, and then added a variable, being equal to the I.sendGetRequest with an 'await' before it.