simplify tests with promises