Answer the question
In order to leave comments, you need to log in
Why does mocha throw an exception on the first failed test and exit?
Wrote tests, here is the first one
describe('Register test', function() {
it('should return errors on empty request', function(done) {
server.post('/register').end(function(err, res) {
res.status.should.equal(422);
const schema = {
properties: {
errors: {
type: 'object',
required: ['email', 'password', 'password_confirm'],
properties: {
email: { type: 'string' },
password: { type: 'string' },
password_confirm: { type: 'string' }
}
}
}
};
ajv.validate(schema, res.body).should.be.true();
done();
});
});
it(...
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question