From 6f0b886a7510c84b1276945e3dcee76c8eb73530 Mon Sep 17 00:00:00 2001 From: Denis Bardadym Date: Tue, 29 Mar 2016 12:52:41 +0300 Subject: [PATCH] Add test for Object.prototype member's name --- test/lib/hierarchy.js | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/test/lib/hierarchy.js b/test/lib/hierarchy.js index 0aaf51c..c0fd877 100644 --- a/test/lib/hierarchy.js +++ b/test/lib/hierarchy.js @@ -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(); +});