File tree 2 files changed +25
-0
lines changed
2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -459,6 +459,20 @@ describe('ngdoc', function(){
459
459
expect ( dom ) . toContain ( 'var modelValue = angular.formatter.myFormatter.parse(userInputString, a);' ) ;
460
460
} ) ;
461
461
} ) ;
462
+
463
+ describe ( 'property' , function ( ) {
464
+ it ( 'should format' , function ( ) {
465
+ var doc = new Doc ( {
466
+ ngdoc :'property' ,
467
+ name :'myProp' ,
468
+ returns :{ type : 'type' , description : 'description' }
469
+ } ) ;
470
+ doc . html_usage_property ( dom ) ;
471
+ expect ( dom ) . toContain ( 'myProp' ) ;
472
+ expect ( dom ) . toContain ( 'type' ) ;
473
+ expect ( dom ) . toContain ( 'description' ) ;
474
+ } ) ;
475
+ } ) ;
462
476
} ) ;
463
477
464
478
} ) ;
Original file line number Diff line number Diff line change @@ -279,6 +279,17 @@ Doc.prototype = {
279
279
} ) ;
280
280
} ,
281
281
282
+ html_usage_property : function ( dom ) {
283
+ var self = this ;
284
+ dom . h ( 'Usage' , function ( ) {
285
+ dom . code ( function ( ) {
286
+ dom . text ( self . name ) ;
287
+ } ) ;
288
+
289
+ self . html_usage_returns ( dom ) ;
290
+ } ) ;
291
+ } ,
292
+
282
293
html_usage_directive : function ( dom ) {
283
294
var self = this ;
284
295
dom . h ( 'Usage' , function ( ) {
You can’t perform that action at this time.
0 commit comments