Add test for constructor and constructor with prototype to check for hasOwnProperty on prototype method