Have cancelAfter bail immediately if the promise is resolved, added tests