Description:

A custom assertion contains information about the request and response, improving debugging. It is created in the logger.ts file and added to initial get, put, post, and delete methods to check the status code. In the event of a discrepancy between the expected and actual status code, it returns more meaningful information. Additionally, a custom assertion is provided (customAssertion.ts) to check for the presence of certain parameters and values on an object, which also includes logger functionality. Therefore, when comparing an object for key-value pairs, the toMatchPartialObject custom assertion should be used. This will provide a custom logger message with all the necessary debugging information in the event of failures.

assertionForAPI.png