Skip to content

Commit a862274

Browse files
committed
Backport test from #380
1 parent 2bda1c3 commit a862274

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

test/error-handling.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,4 +190,19 @@ describe('Error Handling', function () {
190190
done()
191191
})
192192
})
193+
194+
it('should gracefully handle more than one error at a time', function () {
195+
var form = new FormData()
196+
var parser = withLimits({ fileSize: 1, files: 1 }, [
197+
{ name: 'small', maxCount: 1 }
198+
])
199+
200+
form.append('small', util.file('small'))
201+
form.append('small', util.file('small'))
202+
203+
return assertRejects(
204+
util.submitForm(parser, form),
205+
hasCode('LIMIT_FILE_SIZE')
206+
)
207+
})
193208
})

0 commit comments

Comments
 (0)