Added support for promises within async tests.