mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
A couple more tests of exisiting functions as object keys
This commit is contained in:
parent
544f6126a2
commit
1252d83ebc
4
test/cases/contructorproperty.js
Normal file
4
test/cases/contructorproperty.js
Normal file
@ -0,0 +1,4 @@
|
||||
// Simple inheritance model with correct constructor
|
||||
function Test() {}
|
||||
function Test2() { Test.call(this); }
|
||||
Test2.prototype = Object.create(Test.prototype, {constructor: {value: Test2}});
|
||||
@ -8,5 +8,10 @@ Call(
|
||||
valueOf: function()
|
||||
{
|
||||
return this.id;
|
||||
},
|
||||
|
||||
toString: function()
|
||||
{
|
||||
return this.id;
|
||||
}
|
||||
});
|
||||
@ -123,6 +123,7 @@ testFile('test/t/cases/constructstag3.js');
|
||||
testFile('test/t/cases/constructstag4.js');
|
||||
testFile('test/t/cases/constructstag5.js');
|
||||
testFile('test/t/cases/constructortag.js');
|
||||
testFile('test/t/cases/constructorproperty.js');
|
||||
testFile('test/t/cases/copyrighttag.js');
|
||||
testFile('test/t/cases/defaulttag.js');
|
||||
testFile('test/t/cases/deprecatedtag.js');
|
||||
|
||||
8
test/t/cases/constructorproperty.js
Normal file
8
test/t/cases/constructorproperty.js
Normal file
@ -0,0 +1,8 @@
|
||||
(function() {
|
||||
|
||||
test('Should not crash when "contructor" property is used in Object.create() parameter', function() {
|
||||
var docSet = testhelpers.getDocSetFromFile('test/cases/contructorproperty.js');
|
||||
assert.ok(true);
|
||||
});
|
||||
|
||||
})();
|
||||
Loading…
x
Reference in New Issue
Block a user