Support a short code test flow
Use promise.done instead of deprecated promise.end