functional tests using mocha with async