Cleanup promises in mocha tests

 * As suggested in,
   https://gerrit.wikimedia.org/r/#/c/167784/10/tests/mocha/api.js

Change-Id: I0f08b9928e030a1a267105a91eb7727bc3567a4c