Translate tests to expect.js

Also, the existing tests were not written using Mocha's async support.