Make unit tests return a promise instead of manually calling done