From ee0e9a44521218a1d13bc502350414d30ca03cf9 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Wed, 17 Nov 2010 13:07:59 -0800 Subject: adding support for @param.optional --- docs/spec/collectSpec.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'docs/spec') diff --git a/docs/spec/collectSpec.js b/docs/spec/collectSpec.js index b61097f6..822e97fb 100644 --- a/docs/spec/collectSpec.js +++ b/docs/spec/collectSpec.js @@ -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' }]); }); -- cgit v1.2.3