-
Notifications
You must be signed in to change notification settings - Fork 774
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor move
API to async/await
#1025
Conversation
async function fn () { | ||
fn.callCount++ | ||
const callback = args.pop() | ||
setTimeout(() => { | ||
const err = new Error() | ||
err.code = errCode | ||
callback(err) | ||
}, 10) | ||
const err = new Error() | ||
err.code = errCode | ||
|
||
return Promise.reject(err) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The move
now uses the Promise version of the fs.rename
API (instead of the callback version), so the stub here needs to be changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One nit; otherwise LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing work!
Thanks a lot @SukkaW! |
The PR is the final part of #1020.