We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 806a0c6 commit 97f8878Copy full SHA for 97f8878
test/body-parser.js
@@ -141,6 +141,20 @@ describe('bodyParser()', function () {
141
.expect(403, '[entity.verify.failed] no leading space', done)
142
})
143
144
+
145
+ describe('with limit option', function () {
146
+ before(function () {
147
+ this.server = createServer({ limit: '1' })
148
+ })
149
150
+ it('should reject payload', function (done) {
151
+ request(this.server)
152
+ .post('/')
153
+ .set('Content-Type', 'application/json')
154
+ .send('{"user":"tobi"}')
155
+ .expect(413, '[entity.too.large] request entity too large', done)
156
157
158
159
160
function createServer (opts) {
0 commit comments