adding support for @param.optional

This commit is contained in:
Igor Minar
2010-11-17 13:07:59 -08:00
parent 9d36368ff9
commit ee0e9a4452
2 changed files with 6 additions and 3 deletions

View File

@@ -83,16 +83,18 @@ describe('collect', function(){
'{(number|string)} number Number \n to format.');
expect(doc.param).toEqual([{
type : '(number|string)',
name : 'number',
name : 'number',
optional: false,
'default' : undefined,
description : 'Number \n to format.' }]);
});
it('should parse with default', function(){
it('should parse with default and optional', function(){
TAG.param(doc, 'param',
'{(number|string)=} [fractionSize=2] desc');
expect(doc.param).toEqual([{
type : '(number|string)',
name : 'fractionSize',
name : 'fractionSize',
optional: true,
'default' : '2',
description : 'desc' }]);
});