Merge pull request #400 from btd/master

Add test for Object.prototype member's name
This commit is contained in:
John Firebaugh 2016-03-29 08:47:29 -07:00
commit e93e4e4c89

View File

@ -147,3 +147,36 @@ test('hierarchy - anonymous', function (t) {
}]);
t.end();
});
test('hierarchy - object prototype member names', function (t) {
var comments = evaluate(function () {
/**
* @name should
* @function
*/
/**
* @name Assertion
* @class
* @memberof should
*/
/**
* @name hasOwnProperty
* @memberof should.Assertion
* @instance
* @function
**/
/**
* @name otherMethod
* @memberof should.Assertion
* @instance
* @function
**/
});
t.deepEqual(_.map(comments[0].members.static[0].members.instance, 'name'), [ 'hasOwnProperty', 'otherMethod' ]);
t.end();
});