From 610c254aa5b8424ae3c81f685a642317c132fa9f Mon Sep 17 00:00:00 2001 From: Michael Mathews Date: Fri, 17 Dec 2010 15:28:18 +0000 Subject: [PATCH] Changed references to "desc" to "description". --- modules/jsdoc/doclet.js | 12 +++++----- modules/jsdoc/tagdictionary.js | 6 ++--- test/tests/06_jsdoc_tag.js | 6 ++--- test/tests/09_tag_desc.js | 32 +++++++++++++------------- test/tests/12_tag_property.js | 12 +++++----- test/tests/16_tag_return.js | 16 ++++++------- test/tests/19_tag_param.js | 42 +++++++++++++++++----------------- test/tests/24_tag_exception.js | 2 +- test/tests/26_tag_tag.js | 2 +- 9 files changed, 65 insertions(+), 65 deletions(-) diff --git a/modules/jsdoc/doclet.js b/modules/jsdoc/doclet.js index 221309e8..59d5b7a9 100644 --- a/modules/jsdoc/doclet.js +++ b/modules/jsdoc/doclet.js @@ -180,7 +180,7 @@ if (tag.type && tag.type.length && tag.type[0] !== '') { tagValue.type = tag.type; } - if (tag.pdesc) { tagValue.desc = tag.pdesc; } + if (tag.pdesc) { tagValue.description = tag.pdesc; } if (typeof tag.poptional === 'boolean') { tagValue.optional = tag.poptional; } if (typeof tag.pnullable === 'boolean') { tagValue.nullable = tag.pnullable; } if (typeof tag.pdefault !== 'undefined') { tagValue.defaultvalue = tag.pdefault; } @@ -241,15 +241,15 @@ } /** - Add a @desc tag if none exists on untagged text at start of comment. + Add a @description tag if none exists on untagged text at start of comment. @private @function fixDesc @param {string} commentSrc - @return {string} With needed @desc tag added. + @return {string} With needed @description tag added. */ function fixDesc(commentSrc) { if (!/^\s*@/.test(commentSrc)) { - commentSrc = '@desc ' + commentSrc; + commentSrc = '@description ' + commentSrc; } return commentSrc; } @@ -291,7 +291,7 @@ } if (tagAbout.setsDocletDesc) { - tags.addTag('desc', tags[i].value); + tags.addTag('description', tags[i].value); } if (tags[i].name === 'name') { @@ -330,7 +330,7 @@ } if (tags[i].pdesc) { - tags.addTag('desc', tags[i].pdesc); + tags.addTag('description', tags[i].pdesc); } if (kind && kind !== tags[i].name) { diff --git a/modules/jsdoc/tagdictionary.js b/modules/jsdoc/tagdictionary.js index 00473f45..3f5e5dca 100644 --- a/modules/jsdoc/tagdictionary.js +++ b/modules/jsdoc/tagdictionary.js @@ -24,7 +24,7 @@ exports.synonyms = { /*synonym => canonical*/ - 'description': 'desc', + 'desc': 'description', 'function': 'method', 'var': 'property', 'field': 'property', @@ -106,11 +106,11 @@ isScalar: true }); - /** Syntax: @desc + /** Syntax: @description @property {module:jsdoc/tagdictionary~TagDefinition} desc @memberOf module:jsdoc/tagdictionary~tagDefinitions */ - new TagDefinition('desc', { // t + new TagDefinition('description', { // t isExported: true, isScalar: true }); diff --git a/test/tests/06_jsdoc_tag.js b/test/tests/06_jsdoc_tag.js index 420db7c6..43da0588 100644 --- a/test/tests/06_jsdoc_tag.js +++ b/test/tests/06_jsdoc_tag.js @@ -61,14 +61,14 @@ describe('The tag#raw property', function() { it('should be set to all the characters after the leading @', function() { var tag = tags[0]; - expect(tag.raw).to(include, 'desc Hello world'); + expect(tag.raw).to(include, 'description Hello world'); }); }); describe('The tag#name property', function() { it('should be set to the text after the leading @', function() { var tag = tags[0]; - expect(tag.name).to(eql, 'desc'); + expect(tag.name).to(eql, 'description'); }); }); @@ -85,7 +85,7 @@ (function testarea() { /** - @desc Hello world + @description Hello world @name Foo @constructor */ diff --git a/test/tests/09_tag_desc.js b/test/tests/09_tag_desc.js index e6e76ff1..cb9abc47 100644 --- a/test/tests/09_tag_desc.js +++ b/test/tests/09_tag_desc.js @@ -2,7 +2,7 @@ var jsdoc, doclets; - JSpec.describe('@desc', function() { + JSpec.describe('@description', function() { before(function() { // docsets can only be created by parsers @@ -15,26 +15,26 @@ }); describe('A doclet that starts with untagged text', function() { - it('should have an `desc` property set to the text', function() { + it('should have an `description` property set to the text', function() { var doclet = doclets[0].toObject(); - expect(doclet).to(have_property, 'desc'); - expect(doclet.desc).to(eql, 'Here is Edward Bear, coming downstairs now,\nbump,\n bump,\n bump'); - }); - }); - - describe('A doclet that has a @desc tag', function() { - it('should have an `desc` property set to the text of that tag', function() { - var doclet = doclets[1].toObject(); - expect(doclet).to(have_property, 'desc'); - expect(doclet.desc).to(eql, 'Here is Edward Bear, coming downstairs now, bump, bump, bump'); + expect(doclet).to(have_property, 'description'); + expect(doclet.description).to(eql, 'Here is Edward Bear, coming downstairs now,\nbump,\n bump,\n bump'); }); }); describe('A doclet that has a @description tag', function() { - it('should have an `desc` property set to the text of that tag', function() { + it('should have an `description` property set to the text of that tag', function() { + var doclet = doclets[1].toObject(); + expect(doclet).to(have_property, 'description'); + expect(doclet.description).to(eql, 'Here is Edward Bear, coming downstairs now, bump, bump, bump'); + }); + }); + + describe('A doclet that has a @description tag', function() { + it('should have an `description` property set to the text of that tag', function() { var doclet = doclets[2].toObject(); - expect(doclet).to(have_property, 'desc'); - expect(doclet.desc).to(eql, 'Here is Edward Bear, coming downstairs now, bump, bump, bump'); + expect(doclet).to(have_property, 'description'); + expect(doclet.description).to(eql, 'Here is Edward Bear, coming downstairs now, bump, bump, bump'); }); }); }); @@ -52,7 +52,7 @@ /** @namespace Bear - @desc Here is Edward Bear, coming downstairs now, bump, bump, bump + @description Here is Edward Bear, coming downstairs now, bump, bump, bump */ /** diff --git a/test/tests/12_tag_property.js b/test/tests/12_tag_property.js index 2c88eba6..a69a68b3 100644 --- a/test/tests/12_tag_property.js +++ b/test/tests/12_tag_property.js @@ -53,10 +53,10 @@ expect(doclet.type).to(eql, ['string', 'number']); }); - it('should have a `desc` property set to the given description', function() { + it('should have a `description` property set to the given description', function() { var doclet = doclets[3].toObject(); - expect(doclet).to(have_property, 'desc'); - expect(doclet.desc).to(eql, 'Here is a description.'); + expect(doclet).to(have_property, 'description'); + expect(doclet.description).to(eql, 'Here is a description.'); }); }); @@ -82,10 +82,10 @@ expect(doclet.name).to(eql, 'zub'); }); - it('should have a `desc` property set to the given description', function() { + it('should have a `description` property set to the given description', function() { var doclet = doclets[5].toObject(); - expect(doclet).to(have_property, 'desc'); - expect(doclet.desc).to(eql, 'The description here.'); + expect(doclet).to(have_property, 'description'); + expect(doclet.description).to(eql, 'The description here.'); }); }); diff --git a/test/tests/16_tag_return.js b/test/tests/16_tag_return.js index 7303c327..10756af5 100644 --- a/test/tests/16_tag_return.js +++ b/test/tests/16_tag_return.js @@ -15,7 +15,7 @@ doclets = jsdoc.parser.result.map(function($){ return $.toObject(); }); }); - describe('A doclet with a returns tag whose value has a type and desc', function() { + describe('A doclet with a returns tag whose value has a type and description', function() { it('should have an `returns` property', function() { var doclet = doclets[0]; expect(doclet).to(have_property, 'returns'); @@ -29,14 +29,14 @@ expect(returns.type).to(eql, ['number']); }); - it('should have an `desc` property set to the given desc', function() { + it('should have an `description` property set to the given description', function() { var returns = doclets[0].returns; - expect(returns).to(have_property, 'desc'); - expect(returns.desc).to(eql, 'The size of the foo.'); + expect(returns).to(have_property, 'description'); + expect(returns.description).to(eql, 'The size of the foo.'); }); }); - describe('A doclet with a (synonym) return tag whose value has a desc', function() { + describe('A doclet with a (synonym) return tag whose value has a description', function() { it('should have an `returns` property', function() { var doclet = doclets[1]; expect(doclet).to(have_property, 'returns'); @@ -44,10 +44,10 @@ }); describe('The returns value of that doclet', function() { - it('should have an `desc` property set to the given desc', function() { + it('should have an `description` property set to the given description', function() { var returns = doclets[1].returns; - expect(returns).to(have_property, 'desc'); - expect(returns.desc).to(eql, 'So a horse walks into a....'); + expect(returns).to(have_property, 'description'); + expect(returns.description).to(eql, 'So a horse walks into a....'); }); }); diff --git a/test/tests/19_tag_param.js b/test/tests/19_tag_param.js index b11b75e8..b8fd8add 100644 --- a/test/tests/19_tag_param.js +++ b/test/tests/19_tag_param.js @@ -33,12 +33,12 @@ expect(doclet.param[1].name).to(eql, 'message'); }); - it('should not have a `type` or `desc` property ', function() { + it('should not have a `type` or `description` property ', function() { var doclet = doclets[0]; expect(doclet.param[0].type).to(be_undefined); - expect(doclet.param[0].desc).to(be_undefined); + expect(doclet.param[0].description).to(be_undefined); expect(doclet.param[1].type).to(be_undefined); - expect(doclet.param[1].desc).to(be_undefined); + expect(doclet.param[1].description).to(be_undefined); }); }); @@ -74,54 +74,54 @@ expect(doclet.param[0].name).to(eql, 'str'); }); - it('should not have a `desc`', function() { + it('should not have a `description`', function() { var doclet = doclets[2]; - expect(doclet.param.desc).to(be_undefined); + expect(doclet.param.description).to(be_undefined); }); }); - describe('A doclet with one param tag having a type, name and a desc', function() { - it('should have a `param` array with a single member with a `type`, `name` and `desc`', function() { + describe('A doclet with one param tag having a type, name and a description', function() { + it('should have a `param` array with a single member with a `type`, `name` and `description`', function() { var doclet = doclets[3]; expect(doclet).to(have_property, 'param'); expect(doclet.param[0].type).to(be_an, Array); // types are always arrays expect(doclet.param[0].type).to(eql, ['string']); expect(doclet.param[0].name).to(be_an, String); expect(doclet.param[0].name).to(eql, 'message'); - expect(doclet.param[0].desc).to(be_an, String); - expect(doclet.param[0].desc).to(eql, 'the message to encrypt.'); + expect(doclet.param[0].description).to(be_an, String); + expect(doclet.param[0].description).to(eql, 'the message to encrypt.'); }); }); - describe('A param tag using the dash syntax with a `type`, `name` and `desc`', function() { - it('should have a `type`, `name` and `desc`', function() { + describe('A param tag using the dash syntax with a `type`, `name` and `description`', function() { + it('should have a `type`, `name` and `description`', function() { var param = doclets[4].param[0]; expect(param.type).to(be_an, Array); // types are always arrays expect(param.type).to(eql, ['Panel']); expect(param.name).to(be_an, String); expect(param.name).to(eql, 'p'); - expect(param.desc).to(be_an, String); - expect(param.desc).to(eql, 'The panel to update.'); + expect(param.description).to(be_an, String); + expect(param.description).to(eql, 'The panel to update.'); }); }); - describe('A param tag using the dash syntax with just a `desc`', function() { - it('should have a `desc` but no `type` or `name`', function() { + describe('A param tag using the dash syntax with just a `description`', function() { + it('should have a `description` but no `type` or `name`', function() { var param = doclets[4].param[1]; - expect(param.desc).to(be_an, String); - expect(param.desc).to(eql, 'The new content.'); + expect(param.description).to(be_an, String); + expect(param.description).to(eql, 'The new content.'); expect(param.name).to(be_undefined); expect(param.type).to(be_undefined); }); }); - describe('A param tag using the dash syntax with a `type` and a `desc`', function() { - it('should have a `desc` and `type` but no `name`', function() { + describe('A param tag using the dash syntax with a `type` and a `description`', function() { + it('should have a `description` and `type` but no `name`', function() { var param = doclets[4].param[2]; expect(param.type).to(be_an, Array); // types are always arrays expect(param.type).to(eql, ['boolean']); - expect(param.desc).to(be_an, String); - expect(param.desc).to(eql, 'Don\'t replace existing content.'); + expect(param.description).to(be_an, String); + expect(param.description).to(eql, 'Don\'t replace existing content.'); expect(param.name).to(be_undefined); }); }); diff --git a/test/tests/24_tag_exception.js b/test/tests/24_tag_exception.js index 28619020..aafa1de0 100644 --- a/test/tests/24_tag_exception.js +++ b/test/tests/24_tag_exception.js @@ -32,7 +32,7 @@ describe('The value of the `exception` property', function() { it('should be equal to the description of the given tag value', function() { var doclet = doclets[0]; - expect(doclet.exception.desc).to(eql, 'Denominator param cannot be zero.'); + expect(doclet.exception.description).to(eql, 'Denominator param cannot be zero.'); }); }); diff --git a/test/tests/26_tag_tag.js b/test/tests/26_tag_tag.js index 71481cad..7cadb767 100644 --- a/test/tests/26_tag_tag.js +++ b/test/tests/26_tag_tag.js @@ -31,7 +31,7 @@ }); describe('A doclet with two @tag ', function() { - it('should have a tag with a name property set to , and description set to ', function() { + it('should have a tag with a name property set to , and description set to ', function() { var doclet = doclets[1]; expect(doclet.tags[0]).to(be_an, String); expect(doclet.tags[0]).to(be, 'experimental');