Answer the question
In order to leave comments, you need to log in
What is the best library to test JSON responses from the server API?
I would like to write system tests for the service API. I use mocha + should + supertest for testing.
But a record of the form
res.status.should.equal(422);
res.body.should.have.property('errors').which.is.a.Object();
res.body.errors.should.have.property('email');
assert(res.body, {
errors : {
email: string
}
})
Answer the question
In order to leave comments, you need to log in
First, read about psr , then get rid of global variables and read about dependency injection, classes (if they can be introduced into VP at all).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question