Testing API's JSON response with chai

adizbek1998

Adizbek Ergashev

Posted on April 11, 2021

Testing API's JSON response with chai

Sometimes we need to validate our API's response if it correctly returning JSON structure.

We may unintended add some secret fields to JSON response such as passwords, tokens.

To be aware of this we should test the JSON response if does it matches our need.

I've wrote chai plugin which helps to test JSON structures with ease.

image

https://github.com/Adizbek/chai-json-validation

Please rate my work and leave comments below about plugin

💖 💪 🙅 🚩
adizbek1998
Adizbek Ergashev

Posted on April 11, 2021

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related