Bug 1039643: Write unit tests for contacts.js

Can you switch all those `asser.equal` to `assert.deepEqual`. By writing the object to compare to, it will make it easier to see the shape of the objects returned. Do the same for all the tests.