@@ -498,6 +498,41 @@ describe('parse', function () {
498
498
} ) ;
499
499
} ) ;
500
500
501
+ it ( 'param with array indexes' , function ( ) {
502
+ var res = doctrine . parse (
503
+ [
504
+ "/**" ,
505
+ " * @param {String} user.0" ,
506
+ "*/"
507
+ ] . join ( '\n' ) , { unwrap : true } ) ;
508
+ res . tags . should . have . length ( 1 ) ;
509
+ res . tags [ 0 ] . should . have . property ( 'title' , 'param' ) ;
510
+ res . tags [ 0 ] . should . have . property ( 'name' , 'user.0' ) ;
511
+ res . tags [ 0 ] . should . have . property ( 'type' ) ;
512
+ res . tags [ 0 ] . type . should . eql ( {
513
+ type : 'NameExpression' ,
514
+ name : 'String'
515
+ } ) ;
516
+ } ) ;
517
+
518
+ it ( 'param with array indexes and descriptions' , function ( ) {
519
+ var res = doctrine . parse (
520
+ [
521
+ "/**" ,
522
+ " * @param {String} user.0 The first element" ,
523
+ "*/"
524
+ ] . join ( '\n' ) , { unwrap : true } ) ;
525
+ res . tags . should . have . length ( 1 ) ;
526
+ res . tags [ 0 ] . should . have . property ( 'title' , 'param' ) ;
527
+ res . tags [ 0 ] . should . have . property ( 'name' , 'user.0' ) ;
528
+ res . tags [ 0 ] . should . have . property ( 'type' ) ;
529
+ res . tags [ 0 ] . should . have . property ( 'description' , 'The first element' ) ;
530
+ res . tags [ 0 ] . type . should . eql ( {
531
+ type : 'NameExpression' ,
532
+ name : 'String'
533
+ } ) ;
534
+ } ) ;
535
+
501
536
it ( 'arg with properties' , function ( ) {
502
537
var res = doctrine . parse (
503
538
[
0 commit comments