convert tests to mocha

Using mocha reduces the amount of test code, and adds more output that shows what the tests are doing.