refactor tests to mocha-as-promised