fix mocha unit tests