Handle json parse errors with new body-parser module

This commit is contained in:
Girish Ramakrishnan
2017-11-16 11:47:17 -08:00
parent 92acb2954f
commit 98cad0678d
3 changed files with 5 additions and 5 deletions

View File

@@ -70,7 +70,7 @@ describe('REST API', function () {
.send("some invalid non-strict json")
.end(function (error, result) {
expect(result.statusCode).to.equal(400);
expect(result.body.message).to.be('Bad JSON');
expect(result.body.message).to.be('Failed to parse body');
done();
});
});