From 4c69d694d75f01cffbc75be331b5636068a41048 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Wed, 17 Nov 2010 12:13:04 -0800 Subject: make @returns type non-optional --- docs/spec/collectSpec.js | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) (limited to 'docs/spec/collectSpec.js') diff --git a/docs/spec/collectSpec.js b/docs/spec/collectSpec.js index 4d398be3..7777e8f4 100644 --- a/docs/spec/collectSpec.js +++ b/docs/spec/collectSpec.js @@ -161,24 +161,14 @@ describe('collect', function(){ }); describe('@returns', function() { - it('should parse @returns', function() { - expect(function() {TAG.returns(doc, 'returns', '');}) - .not.toThrow(); - }); - - it('should parse @returns with type', function() { - TAG.returns(doc, 'returns', '{string}'); - expect(doc.returns.type).toEqual('string'); - }); - - it('should parse @returns with description', function() { - TAG.returns(doc, 'returns', 'descrip tion'); - expect(doc.returns.description).toEqual('descrip tion'); + it('should not parse @returns without type', function() { + expect(function() {TAG.returns(doc, 'returns', 'lala');}) + .toThrow(); }); it('should parse @returns with type and description', function() { - TAG.returns(doc, 'returns', '{string} description'); - expect(doc.returns).toEqual({type: 'string', description: 'description'}); + TAG.returns(doc, 'returns', '{string} descrip tion'); + expect(doc.returns).toEqual({type: 'string', description: 'descrip tion'}); }); }); -- cgit v1.2.3