Merge pull request #422 from ErnstHaagsman/true-augments

@augments tag: Inherited members correctly identify their origin
This commit is contained in:
Jeff Williams 2013-06-02 16:51:33 -07:00
commit 2090b8d2fe
2 changed files with 13 additions and 1 deletions

View File

@ -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;

View File

@ -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);
});