diff --git a/rhino_modules/jsdoc/src/parser.js b/rhino_modules/jsdoc/src/parser.js index dfd9ac72..72665037 100644 --- a/rhino_modules/jsdoc/src/parser.js +++ b/rhino_modules/jsdoc/src/parser.js @@ -318,6 +318,7 @@ function visitNode(node) { if (!parent.doclet.properties) { parent.doclet.properties = []; } // members of an enum inherit the enum's type if (parent.doclet.type && !e.doclet.type) { e.doclet.type = parent.doclet.type; } + delete e.doclet.undocumented; parent.doclet.properties.push(e.doclet); } } diff --git a/test/cases/enumtag.js b/test/cases/enumtag.js index 2fb14167..2374f09e 100644 --- a/test/cases/enumtag.js +++ b/test/cases/enumtag.js @@ -5,7 +5,6 @@ var TriState = { /** true */ TRUE: 1, - /** false */ FALSE: -1, /** @type {boolean} */ MAYBE: true diff --git a/test/cases/file.js b/test/cases/file.js index 15fb0fc9..e6d62cdc 100644 --- a/test/cases/file.js +++ b/test/cases/file.js @@ -1,5 +1,6 @@ /** * @overview This is a file doclet. + * @copyright Michael Mathews 2011 */ function ignoreMe() { diff --git a/test/t/cases/enumtag.js b/test/t/cases/enumtag.js index 0fb53e14..7969614a 100644 --- a/test/t/cases/enumtag.js +++ b/test/t/cases/enumtag.js @@ -12,6 +12,12 @@ assert.equal(tristate.properties[0].type.names.join(', '), 'number'); }); + test('If no no comment is given for the property it is still included in the enum.', function() { + assert.equal(tristate.properties[1].longname, 'TriState.FALSE'); + assert.equal(typeof tristate.properties[1].undocumented, 'undefined'); + + }); + test('If a @type is given for the property it is reflected in the property value.', function() { assert.equal(tristate.properties[2].type.names.join(', '), 'boolean'); });