more unit tests rewritten to mocha