diff options
Diffstat (limited to 'docs/spec')
| -rw-r--r-- | docs/spec/collectSpec.js | 38 |
1 files changed, 32 insertions, 6 deletions
diff --git a/docs/spec/collectSpec.js b/docs/spec/collectSpec.js index 2d1b559c..371438f5 100644 --- a/docs/spec/collectSpec.js +++ b/docs/spec/collectSpec.js @@ -6,21 +6,29 @@ var Script = process.binding('evals').Script; var collect = load('docs/collect.js'); describe('collect', function(){ + describe('markdown', function(){ + it('should replace angular in markdown', function(){ + expect(collect.markdown('<angular/>')). + toEqual('<p><tt><angular/></tt></p>'); + }); + }); + describe('TAG', function(){ var TAG = collect.TAG; + var doc; + beforeEach(function(){ + doc = {}; + }); + describe('@param', function(){ - var doc; - beforeEach(function(){ - doc = {}; - }); it('should parse with no default', function(){ TAG.param(doc, 'param', - '{(number|string)} number Number to format.'); + '{(number|string)} number Number \n to format.'); expect(doc.param).toEqual([{ type : '(number|string)', name : 'number', 'default' : undefined, - description : 'Number to format.' }]); + description : 'Number \n to format.' }]); }); it('should parse with default', function(){ TAG.param(doc, 'param', @@ -32,7 +40,25 @@ describe('collect', function(){ description : 'desc' }]); }); }); + + describe('@describe', function(){ + it('should support pre blocks', function(){ + TAG.description(doc, 'description', '<pre>abc</pre>'); + expect(doc.description).toEqual('<pre>abc</pre>'); + }); + + describe('@example', function(){ + it('should not remove {{}}', function(){ + TAG.example(doc, 'example', 'text {{ abc }}'); + expect(doc.example).toEqual('text {{ abc }}'); + }); + + }); + }); + }); + + }); function load(path){ |
