@@ -220,22 +220,19 @@ describe('bodyParser.urlencoded()', function () {
220220 } )
221221 } )
222222
223-
224223 describe ( 'with depth option' , function ( ) {
225224 describe ( 'when custom value set' , function ( ) {
226-
227225 it ( 'should reject non possitive numbers' , function ( ) {
228226 assert . throws ( createServer . bind ( null , { extended : true , depth : - 1 } ) ,
229227 / T y p e E r r o r : o p t i o n d e p t h m u s t b e a z e r o o r a p o s i t i v e n u m b e r / )
230228 assert . throws ( createServer . bind ( null , { extended : true , depth : NaN } ) ,
231229 / T y p e E r r o r : o p t i o n d e p t h m u s t b e a z e r o o r a p o s i t i v e n u m b e r / )
232- assert . throws ( createServer . bind ( null , { extended : true , depth : " beep" } ) ,
230+ assert . throws ( createServer . bind ( null , { extended : true , depth : ' beep' } ) ,
233231 / T y p e E r r o r : o p t i o n d e p t h m u s t b e a z e r o o r a p o s i t i v e n u m b e r / )
234232 } )
235233
236-
237234 it ( 'should parse up to the specified depth' , function ( done ) {
238- this . server = createServer ( { extended :true , depth : 10 } )
235+ this . server = createServer ( { extended : true , depth : 10 } )
239236 request ( this . server )
240237 . post ( '/' )
241238 . set ( 'Content-Type' , 'application/x-www-form-urlencoded' )
@@ -244,15 +241,14 @@ describe('bodyParser.urlencoded()', function () {
244241 } )
245242
246243 it ( 'should not parse beyond the specified depth' , function ( done ) {
247- this . server = createServer ( { extended :true , depth : 1 } )
244+ this . server = createServer ( { extended : true , depth : 1 } )
248245 request ( this . server )
249246 . post ( '/' )
250247 . set ( 'Content-Type' , 'application/x-www-form-urlencoded' )
251248 . send ( 'a[b][c][d][e]=value' )
252249 . expect ( 400 , '[querystring.parse.rangeError] The input exceeded the depth' , done )
253250 } )
254251 } )
255-
256252
257253 describe ( 'when default value' , function ( ) {
258254 before ( function ( ) {
@@ -265,7 +261,7 @@ describe('bodyParser.urlencoded()', function () {
265261 deepObject += '[p]'
266262 }
267263 deepObject += '=value'
268-
264+
269265 request ( this . server )
270266 . post ( '/' )
271267 . set ( 'Content-Type' , 'application/x-www-form-urlencoded' )
@@ -281,21 +277,19 @@ describe('bodyParser.urlencoded()', function () {
281277 } )
282278
283279 it ( 'should not parse beyond the specified depth' , function ( done ) {
284- var deepObject = 'a' ;
280+ var deepObject = 'a'
285281 for ( var i = 0 ; i < 33 ; i ++ ) {
286- deepObject += '[p]' ;
282+ deepObject += '[p]'
287283 }
288- deepObject += '=value' ;
284+ deepObject += '=value'
289285
290286 request ( this . server )
291287 . post ( '/' )
292288 . set ( 'Content-Type' , 'application/x-www-form-urlencoded' )
293289 . send ( deepObject )
294- . expect ( 400 , '[querystring.parse.rangeError] The input exceeded the depth' , done ) ;
295- } ) ;
296-
290+ . expect ( 400 , '[querystring.parse.rangeError] The input exceeded the depth' , done )
291+ } )
297292 } )
298-
299293 } )
300294
301295 describe ( 'with inflate option' , function ( ) {
0 commit comments