diff options
| author | Misko Hevery | 2010-11-04 17:41:14 -0700 |
|---|---|---|
| committer | Misko Hevery | 2010-11-05 13:32:37 -0700 |
| commit | 3d6a099d6e40f1e12f6349843218987d472d0f3c (patch) | |
| tree | 5adf8b44fb57767ab6fcb3a046b3e421217dfdb2 /docs/spec/collectSpec.js | |
| parent | 8767e766d13b7d3a1e3b6b06f3030c843d3b19ba (diff) | |
| download | angular.js-3d6a099d6e40f1e12f6349843218987d472d0f3c.tar.bz2 | |
changed to showdown from markup. added validator overview
Diffstat (limited to 'docs/spec/collectSpec.js')
| -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){ |
