test: fixed typo and added test for prototype.constructor