Vigyata.AI
Is this your channel?
GithubGithub03

47 Adds assertJsonIsArray and assertJsonIsObject for TestResponse

This PR adds `assertJsonIsArray()` and `assertJsonIsObject()` on the TestResponse, which makes API testing more precise. I used it to show how an array-of-arrays differs from an associative array in the JavaScript sense.

Buy on Github

You'll be taken to Github to complete your purchase.

Pros

  • +Clear assertions for JSON shape (array vs object)
  • +Helps prevent subtle API contract bugs

Cons

  • -You still need to understand what JSON decodes to in JS terms

Featured in this video