Just one thing though. When you do this:
.expect((res) => {
res.body.data.length = 1;
res.body.data[0].email = "test@example.com";
})
This isn't confirming the response object properties. I was reading an article today on the same topic (rahmanfadhil.com/test-express-with...) and I think that suggests a more effective way to do it.
Thank you. Please never stop writing.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thank you so much for the feedback, I'm glad you liked this article 👊
Just one thing though. When you do this:
.expect((res) => {
res.body.data.length = 1;
res.body.data[0].email = "test@example.com";
})
This isn't confirming the response object properties. I was reading an article today on the same topic (rahmanfadhil.com/test-express-with...) and I think that suggests a more effective way to do it.
Thank you. Please never stop writing.