From 3d6a099d6e40f1e12f6349843218987d472d0f3c Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Thu, 4 Nov 2010 17:41:14 -0700 Subject: changed to showdown from markup. added validator overview --- docs/spec/collectSpec.js | 38 ++++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) (limited to 'docs/spec/collectSpec.js') 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('')). + toEqual('

<angular/>

'); + }); + }); + 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', '
abc
'); + expect(doc.description).toEqual('
abc
'); + }); + + describe('@example', function(){ + it('should not remove {{}}', function(){ + TAG.example(doc, 'example', 'text {{ abc }}'); + expect(doc.example).toEqual('text {{ abc }}'); + }); + + }); + }); + }); + + }); function load(path){ -- cgit v1.2.3