mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
Merge pull request #422 from ErnstHaagsman/true-augments
@augments tag: Inherited members correctly identify their origin
This commit is contained in:
commit
2090b8d2fe
@ -90,7 +90,10 @@ function getAdditions(doclets, docs, longnames) {
|
||||
for (var k = 0, kk = members.length; k < kk; k++) {
|
||||
member = doop(members[k]);
|
||||
|
||||
member.inherits = member.longname;
|
||||
if(!member.inherited)
|
||||
{
|
||||
member.inherits = member.longname;
|
||||
}
|
||||
member.inherited = true;
|
||||
|
||||
member.memberof = doc.longname;
|
||||
|
||||
@ -80,6 +80,15 @@
|
||||
expect(bazMethod3.memberof).toBe("Baz");
|
||||
});
|
||||
|
||||
it('(Grand)children correctly identify the original source of inherited members', function(){
|
||||
expect(fooProp1.inherits).not.toBeDefined();
|
||||
expect(barProp3.inherits).not.toBeDefined();
|
||||
expect(barProp1.inherits).toBe("Foo#prop1");
|
||||
expect(bazProp2.inherits).toBe("Foo#prop2");
|
||||
expect(bazProp3.inherits).toBe("Bar#prop3");
|
||||
expect(bazMethod1.inherits).toBe("Foo#method1");
|
||||
});
|
||||
|
||||
it('When an object is extended, and it overrides an ancestor property, the child does not include docs for the ancestor property.', function() {
|
||||
expect(bazProp1All.length).toBe(1);
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user