Approval Testing
Approval Testing for Complex Outputs: JSON, HTML, and SQL
The problem with complex outputs isn't that they're hard to test — it's that the obvious way to test them is wrong. When your API endpoint returns a JSON object with twenty fields, the instinct is to assert on each one: assertEquals(result.status, "