Skip to content

Commit 6f0b886

Browse files
committed
Add test for Object.prototype member's name
1 parent 40f79e4 commit 6f0b886

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

test/lib/hierarchy.js

+33
Original file line numberDiff line numberDiff line change
@@ -147,3 +147,36 @@ test('hierarchy - anonymous', function (t) {
147147
}]);
148148
t.end();
149149
});
150+
151+
test('hierarchy - object prototype member names', function (t) {
152+
var comments = evaluate(function () {
153+
/**
154+
* @name should
155+
* @function
156+
*/
157+
158+
/**
159+
* @name Assertion
160+
* @class
161+
* @memberof should
162+
*/
163+
164+
/**
165+
* @name hasOwnProperty
166+
* @memberof should.Assertion
167+
* @instance
168+
* @function
169+
**/
170+
171+
/**
172+
* @name otherMethod
173+
* @memberof should.Assertion
174+
* @instance
175+
* @function
176+
**/
177+
});
178+
179+
t.deepEqual(_.map(comments[0].members.static[0].members.instance, 'name'), [ 'hasOwnProperty', 'otherMethod' ]);
180+
181+
t.end();
182+
});

0 commit comments

Comments
 (0)