mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
Extra tests for @alias.
This commit is contained in:
parent
f97c4723af
commit
080ac73d49
10
test/cases/alias2.js
Normal file
10
test/cases/alias2.js
Normal file
@ -0,0 +1,10 @@
|
||||
(function() {
|
||||
|
||||
/** @alias ns.Myclass# */
|
||||
var x = {
|
||||
/** document me */
|
||||
myProperty: 'foo'
|
||||
}
|
||||
|
||||
return x;
|
||||
})();
|
||||
@ -87,6 +87,7 @@ testFile('test/t/cases/modules/data/mod-1.js');
|
||||
testFile('test/t/cases/modules/data/mod-2.js');
|
||||
|
||||
testFile('test/t/cases/alias.js');
|
||||
testFile('test/t/cases/alias2.js');
|
||||
|
||||
report();
|
||||
|
||||
|
||||
18
test/t/cases/alias2.js
Normal file
18
test/t/cases/alias2.js
Normal file
@ -0,0 +1,18 @@
|
||||
(function() {
|
||||
var docSet = testhelpers.getDocSetFromFile('test/cases/alias2.js'),
|
||||
found = docSet.getByLongname('myObject').filter(function($) {
|
||||
return ! $.undocumented;
|
||||
}),
|
||||
|
||||
foundMember = docSet.getByLongname('ns.Myclass#myProperty')
|
||||
|
||||
//dump(found);
|
||||
|
||||
test('When a symbol is a member of an alias of a nested name it is documented as if the memberof is the nested alias value.', function() {
|
||||
assert.equal(foundMember[0].longname, 'ns.Myclass#myProperty');
|
||||
assert.equal(foundMember[0].name, 'myProperty');
|
||||
assert.equal(foundMember[0].memberof, 'ns.Myclass');
|
||||
assert.equal(foundMember[0].scope, 'instance');
|
||||
});
|
||||
|
||||
})();
|
||||
Loading…
x
Reference in New Issue
Block a user