generic object testing for node.js