add a helper function for assert-ing equality of javascript objects