tests(functional): fix promise return, clean up.