mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
@isa becomes @kind
This commit is contained in:
parent
9b38ed16b7
commit
e8bbaef861
@ -213,6 +213,7 @@
|
||||
return o;
|
||||
}
|
||||
|
||||
// TODO need to simplify this string or array business. maybe define some props as scalar?
|
||||
Doclet.prototype.getScope = function() {
|
||||
var scope = this.tagValue('scope');
|
||||
|
||||
@ -276,7 +277,7 @@
|
||||
function preprocess(tags, meta) {
|
||||
var name = '',
|
||||
taggedName = '',
|
||||
isa = '',
|
||||
kind = '',
|
||||
taggedIsa = '',
|
||||
memberof = '',
|
||||
taggedMemberof = '',
|
||||
@ -312,11 +313,11 @@
|
||||
}
|
||||
taggedName = name = tags[i].value;
|
||||
}
|
||||
else if (tags[i].name === 'isa') {
|
||||
if (isa && isa !== tags[i].value) {
|
||||
throw new DocTagConflictError('Symbol has too many isas, cannot be both: ' + isa + ' and ' + tags[i].value);
|
||||
else if (tags[i].name === 'kind') {
|
||||
if (kind && kind !== tags[i].value) {
|
||||
throw new DocTagConflictError('Symbol has too many isas, cannot be both: ' + kind + ' and ' + tags[i].value);
|
||||
}
|
||||
taggedIsa = isa = tags[i].value;
|
||||
taggedIsa = kind = tags[i].value;
|
||||
}
|
||||
else if (tags[i].name === 'memberof') {
|
||||
if (memberof) {
|
||||
@ -326,12 +327,12 @@
|
||||
}
|
||||
|
||||
if ( tagAbout.setsDocletName/*nameables.indexOf(tags[i].name) > -1*/ ) {
|
||||
if (tags[i].name === 'property' && (isa === 'constructor')) {
|
||||
if (tags[i].name === 'property' && (kind === 'constructor')) {
|
||||
// to avoid backwards compatability conflicts we just ignore a @property in a doclet after a @constructor
|
||||
}
|
||||
else if (tags[i].name === 'file') {
|
||||
isFile = true;
|
||||
isa = 'file';
|
||||
kind = 'file';
|
||||
}
|
||||
else {
|
||||
if (tags[i].value) {
|
||||
@ -345,10 +346,10 @@
|
||||
tags[tags.length] = parse_tag.fromText('desc ' + tags[i].pdesc);
|
||||
}
|
||||
|
||||
if (isa && isa !== tags[i].name) {
|
||||
throw new DocTagConflictError('Symbol has too many isas, cannot be both: ' + isa + ' and ' + tags[i].name);
|
||||
if (kind && kind !== tags[i].name) {
|
||||
throw new DocTagConflictError('Symbol has too many isas, cannot be both: ' + kind + ' and ' + tags[i].name);
|
||||
}
|
||||
isa = tags[i].name;
|
||||
kind = tags[i].name;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -361,8 +362,8 @@
|
||||
tags[tags.length] = parse_tag.fromText('name file:'+meta.file+'');
|
||||
}
|
||||
|
||||
if (isa && !taggedIsa) {
|
||||
tags[tags.length] = parse_tag.fromText('isa ' + isa);
|
||||
if (kind && !taggedIsa) {
|
||||
tags[tags.length] = parse_tag.fromText('kind ' + kind);
|
||||
}
|
||||
|
||||
if (memberof && !taggedMemberof) {
|
||||
@ -383,7 +384,7 @@
|
||||
|
||||
// class tags imply a constructor tag
|
||||
if (tags[i].name === 'class' && !doclet.hasTag('constructor') ) {
|
||||
doclet.tags[doclet.tags.length] = parse_tag.fromText('isa constructor');
|
||||
doclet.tags[doclet.tags.length] = parse_tag.fromText('kind constructor');
|
||||
}
|
||||
|
||||
// enums have a defualt type of number
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
@param {Doclet} doclet
|
||||
*/
|
||||
exports.resolve = function(doclet) {
|
||||
var isa = doclet.tagValue('isa'),
|
||||
var kind = doclet.tagValue('kind'),
|
||||
ns = '',
|
||||
name = doclet.tagValue('name') || '',
|
||||
memberof = doclet.tagValue('memberof') || '',
|
||||
@ -68,7 +68,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (isa !== 'file') {
|
||||
else if (kind !== 'file') {
|
||||
[prefix, scope, name] = exports.shorten(name);
|
||||
|
||||
if (prefix) {
|
||||
@ -83,13 +83,13 @@
|
||||
|
||||
// if name doesn't already have a docspace and needs one
|
||||
// the namespace should appear in the path but not the name
|
||||
if (tagDictionary.lookUp(isa).setsDocletDocspace) {
|
||||
if (tagDictionary.lookUp(kind).setsDocletDocspace) {
|
||||
if ( /^[a-z_$-]+:(\S+)/i.test(name) ) {
|
||||
name = RegExp.$1;
|
||||
}
|
||||
|
||||
// add doc-namespace to path
|
||||
ns = isa + ':';
|
||||
ns = kind + ':';
|
||||
}
|
||||
|
||||
if (name) doclet.setTag('name', name);
|
||||
@ -185,7 +185,7 @@
|
||||
|
||||
if (memberof || !enclosing) {
|
||||
// `this` refers to nearest non-inner member in the name path
|
||||
if (enclosingDoc && enclosingDoc.tagValue('isa') !== 'constructor') {
|
||||
if (enclosingDoc && enclosingDoc.tagValue('kind') !== 'constructor') {
|
||||
var parts = memberof.split(/[#~.]/);
|
||||
var suffix = parts.pop();
|
||||
memberof = memberof.slice(0, -suffix.length); // remove suffix from memberof
|
||||
|
||||
@ -14,9 +14,8 @@
|
||||
thisDoclet = null,
|
||||
thisDocletName = '',
|
||||
thisDocletPath = '';
|
||||
|
||||
|
||||
// look for all comments that have names provided
|
||||
|
||||
// look for all comments that have names provided
|
||||
if (node.type === Token.SCRIPT && node.comments) {
|
||||
for each (var comment in node.comments.toArray()) {
|
||||
if (comment.commentType === Token.CommentType.JSDOC) {
|
||||
@ -24,9 +23,9 @@
|
||||
if (commentSrc) {
|
||||
thisDoclet = doclet.makeDoclet(commentSrc, comment, currentSourceName);
|
||||
|
||||
if ( thisDoclet.hasTag('name') && thisDoclet.hasTag('isa') ) {
|
||||
if ( thisDoclet.hasTag('name') && thisDoclet.hasTag('kind') ) {
|
||||
doclets.addDoclet(thisDoclet);
|
||||
if (thisDoclet.tagValue('isa') === 'module') {
|
||||
if (thisDoclet.tagValue('kind') === 'module') {
|
||||
name.setCurrentModule( thisDoclet.tagValue('path') );
|
||||
}
|
||||
}
|
||||
@ -34,7 +33,8 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// use the nocode option to shortcut all the following blah blah
|
||||
if (app.opts.nocode) { return true; }
|
||||
|
||||
// like function foo() {}
|
||||
@ -45,8 +45,8 @@
|
||||
thisDoclet = doclet.makeDoclet(commentSrc, node, currentSourceName);
|
||||
thisDocletName = thisDoclet.tagValue('path');
|
||||
|
||||
if (!thisDoclet.hasTag('isa')) { // guess isa from the source code
|
||||
thisDoclet.addTag('isa', 'method')
|
||||
if (!thisDoclet.hasTag('kind')) { // guess kind from the source code
|
||||
thisDoclet.addTag('kind', 'method')
|
||||
}
|
||||
|
||||
if (!thisDocletName) { // guess name from the source code
|
||||
@ -84,14 +84,14 @@
|
||||
|
||||
thisDoclet = doclet.makeDoclet(commentSrc, node, currentSourceName);
|
||||
thisDocletName = thisDoclet.tagValue('name');
|
||||
nodeKind = thisDoclet.tagValue('isa');
|
||||
nodeKind = thisDoclet.tagValue('kind');
|
||||
|
||||
if (!thisDoclet.hasTag('isa')) { // guess isa from the source code
|
||||
if (!thisDoclet.hasTag('kind')) { // guess kind from the source code
|
||||
if (node.right.type == Token.FUNCTION) { // assume it's a method
|
||||
thisDoclet.addTag('isa', 'method');
|
||||
thisDoclet.addTag('kind', 'method');
|
||||
}
|
||||
else {
|
||||
thisDoclet.addTag('isa', 'property');
|
||||
thisDoclet.addTag('kind', 'property');
|
||||
}
|
||||
}
|
||||
|
||||
@ -135,12 +135,12 @@
|
||||
thisDocletPath = thisDoclet.tagValue('path');
|
||||
thisDocletName = thisDoclet.tagValue('name');
|
||||
|
||||
if (!thisDoclet.hasTag('isa') && val) { // guess isa from the source code
|
||||
if (!thisDoclet.hasTag('kind') && val) { // guess kind from the source code
|
||||
if (val.type == Token.FUNCTION) {
|
||||
thisDoclet.addTag('isa', 'method');
|
||||
thisDoclet.addTag('kind', 'method');
|
||||
}
|
||||
else {
|
||||
thisDoclet.addTag('isa', 'property');
|
||||
thisDoclet.addTag('kind', 'property');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -30,7 +30,7 @@ exports.jsdocSchema = {
|
||||
"optional": true,
|
||||
"maxItems": 1
|
||||
},
|
||||
"isa": {
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"maxItems": 1,
|
||||
"enum": ["constructor", "module", "event", "namespace", "method", "property", "enum", "class", "interface", "constant", "file"]
|
||||
|
||||
@ -65,7 +65,7 @@
|
||||
// default properties of all tags
|
||||
TagDefinition.prototype = {
|
||||
isExported : false, // this tag should appear as a top level property in the doclet?
|
||||
setsDocletIsa : false, // the name of this tag is used to define the doclet's isa property
|
||||
setsDocletKind : false, // the name of this tag is used to define the doclet's kind property
|
||||
setsDocletDesc : false,
|
||||
setsDocletName : false, // this tag can be used to name the doclet
|
||||
setsDocletAttrib : false, // the name of this tag becomes the attribute of the doclet
|
||||
@ -108,13 +108,13 @@
|
||||
isExported: true
|
||||
});
|
||||
|
||||
/** Syntax: @isa <text>
|
||||
/** Syntax: @kind <text>
|
||||
@private
|
||||
@inner
|
||||
@property {TagDefinition} isa
|
||||
@property {TagDefinition} kind
|
||||
@memberOf module:jsdoc/tagdictionary.tagDefinitions
|
||||
*/
|
||||
new TagDefinition('isa', {
|
||||
new TagDefinition('kind', {
|
||||
isExported: true
|
||||
});
|
||||
|
||||
@ -154,7 +154,7 @@
|
||||
new TagDefinition('namespace', { //t
|
||||
canHaveType: true,
|
||||
setsDocletType: true,
|
||||
setsDocletIsa: true,
|
||||
setsDocletKind: true,
|
||||
setsDocletName: true
|
||||
});
|
||||
|
||||
@ -164,7 +164,7 @@
|
||||
@memberOf module:jsdoc/tagdictionary.tagDefinitions
|
||||
*/
|
||||
new TagDefinition('constructor', { //t
|
||||
setsDocletIsa: true,
|
||||
setsDocletKind: true,
|
||||
setsDocletName: true
|
||||
});
|
||||
|
||||
@ -186,7 +186,7 @@
|
||||
new TagDefinition('constant', {
|
||||
canHaveType: true,
|
||||
setsDocletType: true,
|
||||
setsDocletIsa: true,
|
||||
setsDocletKind: true,
|
||||
setsDocletName: true
|
||||
});
|
||||
|
||||
@ -198,7 +198,7 @@
|
||||
new TagDefinition('enum', {
|
||||
canHaveType: true,
|
||||
setsDocletType: true,
|
||||
setsDocletIsa: true,
|
||||
setsDocletKind: true,
|
||||
setsDocletName: true
|
||||
});
|
||||
|
||||
@ -208,7 +208,7 @@
|
||||
@memberOf module:jsdoc/tagdictionary.tagDefinitions
|
||||
*/
|
||||
new TagDefinition('file', { //t
|
||||
setsDocletIsa: true,
|
||||
setsDocletKind: true,
|
||||
setsDocletDesc: true,
|
||||
setsDocletName: true,
|
||||
setsDocletDocspace: true
|
||||
@ -246,7 +246,7 @@
|
||||
@memberOf module:jsdoc/tagdictionary.tagDefinitions
|
||||
*/
|
||||
new TagDefinition('event', {
|
||||
setsDocletIsa: true,
|
||||
setsDocletKind: true,
|
||||
setsDocletName: true,
|
||||
setsDocletDocspace: true
|
||||
});
|
||||
@ -257,7 +257,7 @@
|
||||
@memberOf module:jsdoc/tagdictionary.tagDefinitions
|
||||
*/
|
||||
new TagDefinition('module', {
|
||||
setsDocletIsa: true,
|
||||
setsDocletKind: true,
|
||||
setsDocletName: true,
|
||||
setsDocletDocspace: true
|
||||
});
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
<% if (doc.length) { %>
|
||||
<ul>
|
||||
<% for ( var i = 0; i < doc.length; i++ ) { %>
|
||||
<li class="symbol"><i>{<%= doc[i].isa %>}</i> <%= doc[i].path %> - <%= tmpl.summarize(doc[i].desc) %></li>
|
||||
<li class="symbol"><i>{<%= doc[i].kind %>}</i> <%= doc[i].path %> - <%= tmpl.summarize(doc[i].desc) %></li>
|
||||
<% } %>
|
||||
</ul>
|
||||
<% } %>
|
||||
|
||||
@ -34,11 +34,11 @@
|
||||
});
|
||||
});
|
||||
|
||||
describe('A property doclet that has no @name or @isa whose name starts with `this.`, that is scoped to a non-constructor global function', function() {
|
||||
describe('A property doclet that has no @name or @kind whose name starts with `this.`, that is scoped to a non-constructor global function', function() {
|
||||
it('should correctly resolve to a property of the global scope', function() {
|
||||
var doclet = doclets[2];
|
||||
expect(doclet).to(have_property, 'isa');
|
||||
expect(doclet.isa).to(eql, 'property');
|
||||
expect(doclet).to(have_property, 'kind');
|
||||
expect(doclet.kind).to(eql, 'property');
|
||||
expect(doclet).to(have_property, 'name');
|
||||
expect(doclet.name).to(eql, 'g');
|
||||
expect(doclet).to(have_property, 'path');
|
||||
@ -46,11 +46,11 @@
|
||||
});
|
||||
});
|
||||
|
||||
describe('A method doclet that has no @name or @isa whose name starts with `this.`, that is scoped to a constructor function', function() {
|
||||
describe('A method doclet that has no @name or @kind whose name starts with `this.`, that is scoped to a constructor function', function() {
|
||||
it('should correctly resolve to a method of the constructor', function() {
|
||||
var doclet = doclets[4];
|
||||
expect(doclet).to(have_property, 'isa');
|
||||
expect(doclet.isa).to(eql, 'method');
|
||||
expect(doclet).to(have_property, 'kind');
|
||||
expect(doclet.kind).to(eql, 'method');
|
||||
expect(doclet).to(have_property, 'name');
|
||||
expect(doclet.name).to(eql, 'bar');
|
||||
expect(doclet).to(have_property, 'path');
|
||||
@ -58,11 +58,11 @@
|
||||
});
|
||||
});
|
||||
|
||||
describe('An inner method doclet that has no @name or @isa, and is scoped to a constructor function', function() {
|
||||
describe('An inner method doclet that has no @name or @kind, and is scoped to a constructor function', function() {
|
||||
it('should correctly resolve to an inner method of the constructor', function() {
|
||||
var doclet = doclets[5];
|
||||
expect(doclet).to(have_property, 'isa');
|
||||
expect(doclet.isa).to(eql, 'method');
|
||||
expect(doclet).to(have_property, 'kind');
|
||||
expect(doclet.kind).to(eql, 'method');
|
||||
expect(doclet).to(have_property, 'name');
|
||||
expect(doclet.name).to(eql, 'inner');
|
||||
expect(doclet).to(have_property, 'path');
|
||||
@ -72,11 +72,11 @@
|
||||
});
|
||||
});
|
||||
|
||||
describe('A nested inner method doclet that has no @name or @isa, and is scoped to an inner method', function() {
|
||||
describe('A nested inner method doclet that has no @name or @kind, and is scoped to an inner method', function() {
|
||||
it('should correctly resolve to an inner method of the a inner method', function() {
|
||||
var doclet = doclets[6];
|
||||
expect(doclet).to(have_property, 'isa');
|
||||
expect(doclet.isa).to(eql, 'method');
|
||||
expect(doclet).to(have_property, 'kind');
|
||||
expect(doclet.kind).to(eql, 'method');
|
||||
expect(doclet).to(have_property, 'name');
|
||||
expect(doclet.name).to(eql, 'deep');
|
||||
expect(doclet).to(have_property, 'path');
|
||||
@ -86,11 +86,11 @@
|
||||
});
|
||||
});
|
||||
|
||||
describe('A property doclet whose name starts with `this.`, that has no @name or @isa, and is scoped to an inner method', function() {
|
||||
describe('A property doclet whose name starts with `this.`, that has no @name or @kind, and is scoped to an inner method', function() {
|
||||
it('should correctly resolve to a property of the global scope', function() {
|
||||
var doclet = doclets[7];
|
||||
expect(doclet).to(have_property, 'isa');
|
||||
expect(doclet.isa).to(eql, 'property');
|
||||
expect(doclet).to(have_property, 'kind');
|
||||
expect(doclet.kind).to(eql, 'property');
|
||||
expect(doclet).to(have_property, 'name');
|
||||
expect(doclet.name).to(eql, 'globalProp');
|
||||
expect(doclet).to(have_property, 'path');
|
||||
@ -98,11 +98,11 @@
|
||||
});
|
||||
});
|
||||
|
||||
describe('A global method whose name starts with `this.`, that has no @name or @isa', function() {
|
||||
describe('A global method whose name starts with `this.`, that has no @name or @kind', function() {
|
||||
it('should correctly resolve to a property of the global scope', function() {
|
||||
var doclet = doclets[8];
|
||||
expect(doclet).to(have_property, 'isa');
|
||||
expect(doclet.isa).to(eql, 'method');
|
||||
expect(doclet).to(have_property, 'kind');
|
||||
expect(doclet.kind).to(eql, 'method');
|
||||
expect(doclet).to(have_property, 'name');
|
||||
expect(doclet.name).to(eql, 'globalFunc');
|
||||
expect(doclet).to(have_property, 'path');
|
||||
|
||||
@ -52,22 +52,22 @@
|
||||
|
||||
/**
|
||||
@name Tipsy
|
||||
@isa property
|
||||
@kind property
|
||||
*/
|
||||
|
||||
/**
|
||||
@name Tubbie.LaLa
|
||||
@isa property
|
||||
@kind property
|
||||
*/
|
||||
|
||||
/**
|
||||
@name Tubbie."and.don't.forget#Po!"
|
||||
@isa property
|
||||
@kind property
|
||||
*/
|
||||
|
||||
/**
|
||||
@name Custards.0
|
||||
@isa property
|
||||
@kind property
|
||||
*/
|
||||
|
||||
})();
|
||||
@ -17,10 +17,10 @@
|
||||
});
|
||||
|
||||
describe('A doclet from a constructor tag with a name tag and no code', function() {
|
||||
it('should have an `isa` property set to "constructor"', function() {
|
||||
it('should have an `kind` property set to "constructor"', function() {
|
||||
var doclet = doclets[0];
|
||||
expect(doclet).to(have_property, 'isa');
|
||||
expect(doclet.isa).to(eql, 'constructor');
|
||||
expect(doclet).to(have_property, 'kind');
|
||||
expect(doclet.kind).to(eql, 'constructor');
|
||||
});
|
||||
|
||||
it('should have a `name` property set to the given name"', function() {
|
||||
@ -31,10 +31,10 @@
|
||||
});
|
||||
|
||||
describe('A doclet from a named constructor tag and no code', function() {
|
||||
it('should have an `isa` property set to "constructor"', function() {
|
||||
it('should have an `kind` property set to "constructor"', function() {
|
||||
var doclet = doclets[1];
|
||||
expect(doclet).to(have_property, 'isa');
|
||||
expect(doclet.isa).to(eql, 'constructor');
|
||||
expect(doclet).to(have_property, 'kind');
|
||||
expect(doclet.kind).to(eql, 'constructor');
|
||||
});
|
||||
|
||||
it('should have a `name` property set to the given name"', function() {
|
||||
@ -45,10 +45,10 @@
|
||||
});
|
||||
|
||||
describe('A doclet from a constructor tag and named code', function() {
|
||||
it('should have an `isa` property set to "constructor"', function() {
|
||||
it('should have an `kind` property set to "constructor"', function() {
|
||||
var doclet = doclets[2];
|
||||
expect(doclet).to(have_property, 'isa');
|
||||
expect(doclet.isa).to(eql, 'constructor');
|
||||
expect(doclet).to(have_property, 'kind');
|
||||
expect(doclet.kind).to(eql, 'constructor');
|
||||
});
|
||||
|
||||
it('should have a `name` property set to the given name"', function() {
|
||||
@ -59,10 +59,10 @@
|
||||
});
|
||||
|
||||
describe('A doclet from a constructor tag and named anonymous function', function() {
|
||||
it('should have an `isa` property set to "constructor"', function() {
|
||||
it('should have an `kind` property set to "constructor"', function() {
|
||||
var doclet = doclets[3];
|
||||
expect(doclet).to(have_property, 'isa');
|
||||
expect(doclet.isa).to(eql, 'constructor');
|
||||
expect(doclet).to(have_property, 'kind');
|
||||
expect(doclet.kind).to(eql, 'constructor');
|
||||
});
|
||||
|
||||
it('should have a `name` property set to the given name"', function() {
|
||||
@ -73,10 +73,10 @@
|
||||
});
|
||||
|
||||
describe('A doclet from a constructor tag and named anonymous function part of a var', function() {
|
||||
it('should have an `isa` property set to "constructor"', function() {
|
||||
it('should have an `kind` property set to "constructor"', function() {
|
||||
var doclet = doclets[4];
|
||||
expect(doclet).to(have_property, 'isa');
|
||||
expect(doclet.isa).to(eql, 'constructor');
|
||||
expect(doclet).to(have_property, 'kind');
|
||||
expect(doclet.kind).to(eql, 'constructor');
|
||||
});
|
||||
|
||||
it('should have a `name` property set to the given name"', function() {
|
||||
|
||||
@ -15,10 +15,10 @@
|
||||
});
|
||||
|
||||
describe('A doclet from a namespace tag with a name tag and no code', function() {
|
||||
it('should have an `isa` property set to "namespace"', function() {
|
||||
it('should have an `kind` property set to "namespace"', function() {
|
||||
var doclet = doclets[0].toObject();
|
||||
expect(doclet).to(have_property, 'isa');
|
||||
expect(doclet.isa).to(eql, 'namespace');
|
||||
expect(doclet).to(have_property, 'kind');
|
||||
expect(doclet.kind).to(eql, 'namespace');
|
||||
});
|
||||
|
||||
it('should have a `name` property set to the given name"', function() {
|
||||
@ -29,10 +29,10 @@
|
||||
});
|
||||
|
||||
describe('A doclet from a named namespace tag and no code', function() {
|
||||
it('should have an `isa` property set to "namespace"', function() {
|
||||
it('should have an `kind` property set to "namespace"', function() {
|
||||
var doclet = doclets[1].toObject();
|
||||
expect(doclet).to(have_property, 'isa');
|
||||
expect(doclet.isa).to(eql, 'namespace');
|
||||
expect(doclet).to(have_property, 'kind');
|
||||
expect(doclet.kind).to(eql, 'namespace');
|
||||
});
|
||||
|
||||
it('should have a `name` property set to the given name"', function() {
|
||||
@ -43,10 +43,10 @@
|
||||
});
|
||||
|
||||
describe('A doclet from a namespace tag and named code', function() {
|
||||
it('should have an `isa` property set to "namespace"', function() {
|
||||
it('should have an `kind` property set to "namespace"', function() {
|
||||
var doclet = doclets[2].toObject();
|
||||
expect(doclet).to(have_property, 'isa');
|
||||
expect(doclet.isa).to(eql, 'namespace');
|
||||
expect(doclet).to(have_property, 'kind');
|
||||
expect(doclet.kind).to(eql, 'namespace');
|
||||
});
|
||||
|
||||
it('should have a `name` property set to the given name"', function() {
|
||||
@ -57,10 +57,10 @@
|
||||
});
|
||||
|
||||
describe('A doclet from a namespace tag and named anonymous function', function() {
|
||||
it('should have an `isa` property set to "namespace"', function() {
|
||||
it('should have an `kind` property set to "namespace"', function() {
|
||||
var doclet = doclets[3].toObject();
|
||||
expect(doclet).to(have_property, 'isa');
|
||||
expect(doclet.isa).to(eql, 'namespace');
|
||||
expect(doclet).to(have_property, 'kind');
|
||||
expect(doclet.kind).to(eql, 'namespace');
|
||||
});
|
||||
|
||||
it('should have a `name` property set to the given name"', function() {
|
||||
|
||||
@ -15,10 +15,10 @@
|
||||
});
|
||||
|
||||
describe('A doclet with a named @property attached to a namespace', function() {
|
||||
it('should have an `isa` property set to "property"', function() {
|
||||
it('should have an `kind` property set to "property"', function() {
|
||||
var doclet = doclets[2].toObject();
|
||||
expect(doclet).to(have_property, 'isa');
|
||||
expect(doclet.isa).to(eql, 'property');
|
||||
expect(doclet).to(have_property, 'kind');
|
||||
expect(doclet.kind).to(eql, 'property');
|
||||
});
|
||||
|
||||
it('should have a `name` property set to the given name"', function() {
|
||||
@ -35,10 +35,10 @@
|
||||
});
|
||||
|
||||
describe('A doclet with a named @property and a type and a description', function() {
|
||||
it('should have an `isa` property set to "property"', function() {
|
||||
it('should have an `kind` property set to "property"', function() {
|
||||
var doclet = doclets[3].toObject();
|
||||
expect(doclet).to(have_property, 'isa');
|
||||
expect(doclet.isa).to(eql, 'property');
|
||||
expect(doclet).to(have_property, 'kind');
|
||||
expect(doclet.kind).to(eql, 'property');
|
||||
});
|
||||
|
||||
it('should have a `name` property set to the given name"', function() {
|
||||
@ -63,17 +63,17 @@
|
||||
describe('A doclet with a named @property after to a constructor tag', function() {
|
||||
it('should be a constructor', function() {
|
||||
var doclet = doclets[4].toObject();
|
||||
expect(doclet).to(have_property, 'isa');
|
||||
expect(doclet).to(have_property, 'kind');
|
||||
|
||||
expect(doclet.isa).to(eql, 'constructor');
|
||||
expect(doclet.kind).to(eql, 'constructor');
|
||||
});
|
||||
});
|
||||
|
||||
describe('A doclet with a named @var tag and a description', function() {
|
||||
it('should have an `isa` property set to "property"', function() {
|
||||
it('should have an `kind` property set to "property"', function() {
|
||||
var doclet = doclets[5].toObject();
|
||||
expect(doclet).to(have_property, 'isa');
|
||||
expect(doclet.isa).to(eql, 'property');
|
||||
expect(doclet).to(have_property, 'kind');
|
||||
expect(doclet.kind).to(eql, 'property');
|
||||
});
|
||||
|
||||
it('should have a `name` property set to the given name', function() {
|
||||
@ -90,10 +90,10 @@
|
||||
});
|
||||
|
||||
describe('A doclet with no name and a typed @property tag', function() {
|
||||
it('should have an `isa` property set to "property"', function() {
|
||||
it('should have an `kind` property set to "property"', function() {
|
||||
var doclet = doclets[6].toObject();
|
||||
expect(doclet).to(have_property, 'isa');
|
||||
expect(doclet.isa).to(eql, 'property');
|
||||
expect(doclet).to(have_property, 'kind');
|
||||
expect(doclet.kind).to(eql, 'property');
|
||||
});
|
||||
|
||||
it('should have a `type` property set to the given type', function() {
|
||||
|
||||
@ -15,10 +15,10 @@
|
||||
});
|
||||
|
||||
describe('A doclet with a named @method attached to a namespace', function() {
|
||||
it('should have an `isa` property set to "method"', function() {
|
||||
it('should have an `kind` property set to "method"', function() {
|
||||
var doclet = doclets[2].toObject();
|
||||
expect(doclet).to(have_property, 'isa');
|
||||
expect(doclet.isa).to(eql, 'method');
|
||||
expect(doclet).to(have_property, 'kind');
|
||||
expect(doclet.kind).to(eql, 'method');
|
||||
});
|
||||
|
||||
it('should have a `name` property set to the given name"', function() {
|
||||
@ -35,10 +35,10 @@
|
||||
});
|
||||
|
||||
describe('A doclet with a named @method attached to a constructor', function() {
|
||||
it('should have an `isa` property set to "method"', function() {
|
||||
it('should have an `kind` property set to "method"', function() {
|
||||
var doclet = doclets[3].toObject();
|
||||
expect(doclet).to(have_property, 'isa');
|
||||
expect(doclet.isa).to(eql, 'method');
|
||||
expect(doclet).to(have_property, 'kind');
|
||||
expect(doclet.kind).to(eql, 'method');
|
||||
});
|
||||
|
||||
it('should have a `name` property set to the given name"', function() {
|
||||
@ -55,10 +55,10 @@
|
||||
});
|
||||
|
||||
describe('A doclet with a named @function tag', function() {
|
||||
it('should have an `isa` property set to "method"', function() {
|
||||
it('should have an `kind` property set to "method"', function() {
|
||||
var doclet = doclets[4].toObject();
|
||||
expect(doclet).to(have_property, 'isa');
|
||||
expect(doclet.isa).to(eql, 'method');
|
||||
expect(doclet).to(have_property, 'kind');
|
||||
expect(doclet.kind).to(eql, 'method');
|
||||
});
|
||||
|
||||
it('should have a `name` property set to the given name"', function() {
|
||||
|
||||
@ -16,10 +16,10 @@
|
||||
});
|
||||
|
||||
describe('A doclet with a method tag and a memberof tag', function() {
|
||||
it('should have an `isa` property set to "method"', function() {
|
||||
it('should have an `kind` property set to "method"', function() {
|
||||
var doclet = doclets[2];
|
||||
expect(doclet).to(have_property, 'isa');
|
||||
expect(doclet.isa).to(eql, 'method');
|
||||
expect(doclet).to(have_property, 'kind');
|
||||
expect(doclet.kind).to(eql, 'method');
|
||||
});
|
||||
|
||||
it('should have a `name` property set to the given name"', function() {
|
||||
@ -42,10 +42,10 @@
|
||||
});
|
||||
|
||||
describe('A doclet with a property tag and a member tag', function() {
|
||||
it('should have an `isa` property set to "property"', function() {
|
||||
it('should have an `kind` property set to "property"', function() {
|
||||
var doclet = doclets[3];
|
||||
expect(doclet).to(have_property, 'isa');
|
||||
expect(doclet.isa).to(eql, 'property');
|
||||
expect(doclet).to(have_property, 'kind');
|
||||
expect(doclet.kind).to(eql, 'property');
|
||||
});
|
||||
|
||||
it('should have a `name` property set to the given name"', function() {
|
||||
@ -68,10 +68,10 @@
|
||||
});
|
||||
|
||||
describe('A doclet with a property tag and a member tag and an inner tag', function() {
|
||||
it('should have an `isa` property set to "property"', function() {
|
||||
it('should have an `kind` property set to "property"', function() {
|
||||
var doclet = doclets[4];
|
||||
expect(doclet).to(have_property, 'isa');
|
||||
expect(doclet.isa).to(eql, 'property');
|
||||
expect(doclet).to(have_property, 'kind');
|
||||
expect(doclet.kind).to(eql, 'property');
|
||||
});
|
||||
|
||||
it('should have a `name` property set to the given name"', function() {
|
||||
@ -94,10 +94,10 @@
|
||||
});
|
||||
|
||||
describe('A doclet with a property tag and a member tag and an instance access tag', function() {
|
||||
it('should have an `isa` property set to "property"', function() {
|
||||
it('should have an `kind` property set to "property"', function() {
|
||||
var doclet = doclets[5];
|
||||
expect(doclet).to(have_property, 'isa');
|
||||
expect(doclet.isa).to(eql, 'property');
|
||||
expect(doclet).to(have_property, 'kind');
|
||||
expect(doclet.kind).to(eql, 'property');
|
||||
});
|
||||
|
||||
it('should have a `name` property set to the given name"', function() {
|
||||
|
||||
@ -17,10 +17,10 @@
|
||||
});
|
||||
|
||||
describe('A doclet from a class tag with a name tag and no code', function() {
|
||||
it('should have an `isa` property set to "constructor"', function() {
|
||||
it('should have an `kind` property set to "constructor"', function() {
|
||||
var doclet = doclets[0];
|
||||
expect(doclet).to(have_property, 'isa');
|
||||
expect(doclet.isa).to(eql, 'constructor');
|
||||
expect(doclet).to(have_property, 'kind');
|
||||
expect(doclet.kind).to(eql, 'constructor');
|
||||
});
|
||||
|
||||
it('should have a `name` property set to the given name"', function() {
|
||||
|
||||
@ -16,10 +16,10 @@
|
||||
});
|
||||
|
||||
describe('A doclet with a fileoverview tag and no name tag', function() {
|
||||
it('should have an `isa` property set to "file"', function() {
|
||||
it('should have an `kind` property set to "file"', function() {
|
||||
var doclet = doclets[0];
|
||||
expect(doclet).to(have_property, 'isa');
|
||||
expect(doclet.isa).to(eql, 'file');
|
||||
expect(doclet).to(have_property, 'kind');
|
||||
expect(doclet.kind).to(eql, 'file');
|
||||
});
|
||||
|
||||
it('should have an `name` property set to a string equal to the files name', function() {
|
||||
|
||||
@ -15,10 +15,10 @@
|
||||
});
|
||||
|
||||
describe('A doclet with a @const tag having a type and no given name', function() {
|
||||
it('should have an `isa` property set to "constant"', function() {
|
||||
it('should have an `kind` property set to "constant"', function() {
|
||||
var doclet = doclets[0].toObject();
|
||||
expect(doclet).to(have_property, 'isa');
|
||||
expect(doclet.isa).to(eql, 'constant');
|
||||
expect(doclet).to(have_property, 'kind');
|
||||
expect(doclet.kind).to(eql, 'constant');
|
||||
});
|
||||
|
||||
it('should have a `name` property set to the name in the code', function() {
|
||||
@ -35,10 +35,10 @@
|
||||
});
|
||||
|
||||
describe('A doclet with a @const tag and a type', function() {
|
||||
it('should have an `isa` property set to "constant"', function() {
|
||||
it('should have an `kind` property set to "constant"', function() {
|
||||
var doclet = doclets[1].toObject();
|
||||
expect(doclet).to(have_property, 'isa');
|
||||
expect(doclet.isa).to(eql, 'constant');
|
||||
expect(doclet).to(have_property, 'kind');
|
||||
expect(doclet.kind).to(eql, 'constant');
|
||||
});
|
||||
|
||||
it('should have an `type` property set to the given type', function() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user