41 })
42
43▶ // The old node error message modification in body parser is catching this
44 it('should 400 when only whitespace', function (done) {
45 request(createApp())
· · ·
47 .set('Content-Type', 'application/json')
48 .send(' \n')
49▶ .expect(400, '[entity.parse.failed] ' + parseError(' \n'), done)
50 })
51
· · ·
98 .set('Content-Type', 'application/json')
99 .send('{:')
100▶ .expect(400, '[entity.parse.failed] ' + parseError('{:'), done)
101 })
102
· · ·
106 .set('Content-Type', 'application/json')
107 .send('{"user"')
108▶ .expect(400, '[entity.parse.failed] ' + parseError('{"user"'), done)
109 })
110
· · ·
111▶ it('should include original body on error object', function (done) {
112 request(this.app)
113 .post('/')
+ 25 more matches in this file