mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
Added tests for @member.
This commit is contained in:
parent
97ae97b46f
commit
a00113b32c
11
test/cases/memberoftag.js
Normal file
11
test/cases/memberoftag.js
Normal file
@ -0,0 +1,11 @@
|
||||
/** @constructor
|
||||
@member mathlib
|
||||
*/
|
||||
function Data() {
|
||||
|
||||
/** @property */
|
||||
this.point = {};
|
||||
}
|
||||
|
||||
/** @namespace */
|
||||
mathlib = {Data: Data};
|
||||
@ -97,6 +97,7 @@ testFile('test/t/cases/deprecatedtag.js');
|
||||
testFile('test/t/cases/exceptiontag.js');
|
||||
testFile('test/t/cases/globaltag.js');
|
||||
testFile('test/t/cases/ignoretag.js');
|
||||
testFile('test/t/cases/memberoftag.js');
|
||||
testFile('test/t/cases/paramtag.js');
|
||||
testFile('test/t/cases/privatetag.js');
|
||||
testFile('test/t/cases/readonlytag.js');
|
||||
|
||||
15
test/t/cases/memberoftag.js
Normal file
15
test/t/cases/memberoftag.js
Normal file
@ -0,0 +1,15 @@
|
||||
(function() {
|
||||
var docSet = testhelpers.getDocSetFromFile('test/cases/memberoftag.js'),
|
||||
Data = docSet.getByLongname('mathlib.Data')[0],
|
||||
point = docSet.getByLongname('mathlib.Data#point')[0];
|
||||
|
||||
//dump(docSet.doclets); exit(0);
|
||||
|
||||
test('When a symbol has an @member tag, the doclet has a long name that includes the parent.', function() {
|
||||
assert.equal(typeof Data, 'object');
|
||||
assert.equal(typeof point, 'object');
|
||||
|
||||
assert.equal(Data.memberof, 'mathlib');
|
||||
assert.equal(Data.name, 'Data');
|
||||
});
|
||||
})();
|
||||
Loading…
x
Reference in New Issue
Block a user