Supertest · ตรวจ Response Contract
Checkpoint: Response Contract
เขียน assertion สำหรับ success, collection และ error response
Checkpoint: Response Contract
ใช้ checkpoint นี้ตรวจว่าคุณเลือกระดับ assertion ได้เหมาะสมกับ status, body, header, collection และ error response
ตรวจความเข้าใจ
ตอบแล้ว 0/3
ตรวจ response ให้พอดี
ตอบจาก contract และ flow ที่เรียนมาแล้ว แล้วตรวจ feedback ของแต่ละข้อ
1
ถ้า id ถูกสร้างใหม่ทุกครั้ง ควร assert แบบใด
2
ถ้าต้องตรวจ `items` และ `total` ควรเก็บสิ่งใดไว้ก่อน
3