diff options
| author | Igor Minar | 2011-02-06 20:44:55 -0800 |
|---|---|---|
| committer | Igor Minar | 2011-02-07 23:55:02 -0800 |
| commit | f00b1578415ff45e5ce21de79e7bec00ab4dea51 (patch) | |
| tree | 0aad7b208b19999afd04f735728679cfe18df95f /docs/spec | |
| parent | ae20f0c1b3f8ab30d3ede613cfe4ad32e3175ee9 (diff) | |
| download | angular.js-f00b1578415ff45e5ce21de79e7bec00ab4dea51.tar.bz2 | |
@property should require type and description should be markdownified
Diffstat (limited to 'docs/spec')
| -rw-r--r-- | docs/spec/ngdocSpec.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/docs/spec/ngdocSpec.js b/docs/spec/ngdocSpec.js index 144b3376..95e86d99 100644 --- a/docs/spec/ngdocSpec.js +++ b/docs/spec/ngdocSpec.js @@ -215,13 +215,13 @@ describe('ngdoc', function(){ expect(doc.properties.length).toEqual(2); }); - it('should parse @property with only name', function() { + it('should not parse @property without a type', function() { var doc = new Doc("@property fake"); - doc.parse(); - expect(doc.properties[0].name).toEqual('fake'); + expect(function() { doc.parse(); }). + toThrow(new Error("Not a valid 'property' format: fake")); }); - it('should parse @property with optional type', function() { + it('should parse @property with type', function() { var doc = new Doc("@property {string} name"); doc.parse(); expect(doc.properties[0].name).toEqual('name'); @@ -229,10 +229,10 @@ describe('ngdoc', function(){ }); it('should parse @property with optional description', function() { - var doc = new Doc("@property name desc rip tion"); + var doc = new Doc("@property {string} name desc rip tion"); doc.parse(); expect(doc.properties[0].name).toEqual('name'); - expect(doc.properties[0].description).toEqual('desc rip tion'); + expect(doc.properties[0].description).toEqual('<p>desc rip tion</p>'); }); it('should parse @property with type and description both', function() { @@ -240,7 +240,7 @@ describe('ngdoc', function(){ doc.parse(); expect(doc.properties[0].name).toEqual('name'); expect(doc.properties[0].type).toEqual('bool'); - expect(doc.properties[0].description).toEqual('desc rip tion'); + expect(doc.properties[0].description).toEqual('<p>desc rip tion</p>'); }); }); |
