How can I check that two objects have the same set of property names?
问题 I am using node, mocha, and chai for my application. I want to test that my returned results data property is the same "type of object" as one of my model objects (Very similar to chai's instance). I just want to confirm that the two objects have the same sets of property names. I am specifically not interested in the actual values of the properties. Let's say I have the model Person like below. I want to check that my results.data has all the same properties as the expected model does. So in