How to Test JSON Schema with AJV in TypeScript
Published in
5 min readOct 24, 2019
How can you test if your request and response match the interfaces? When I was a beginner to Jest
, I only used toMatchSnapshot
. With toMatchShot
, you can leave the snapshot of data you pass into expect
if there is no existing snapshot. If there is, then Jest
automatically compares the existing one to the value you passed into expect
.