node icon indicating copy to clipboard operation
node copied to clipboard

test: change promises to async/await

Open MadhulikaSharma95 opened this issue 3 years ago • 3 comments

MadhulikaSharma95 avatar Sep 16 '22 20:09 MadhulikaSharma95

CI: https://ci.nodejs.org/job/node-test-pull-request/46630/

nodejs-github-bot avatar Sep 16 '22 21:09 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/46634/

nodejs-github-bot avatar Sep 17 '22 13:09 nodejs-github-bot

Fast-track has been requested by @Trott. Please 👍 to approve.

github-actions[bot] avatar Sep 17 '22 21:09 github-actions[bot]

CI: https://ci.nodejs.org/job/node-test-pull-request/46778/

nodejs-github-bot avatar Sep 25 '22 16:09 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/46790/

nodejs-github-bot avatar Sep 25 '22 23:09 nodejs-github-bot

Pro tip: use git mv when renaming file and also changing its contents. That's not a silver bullet, but it does generally result in a move instead of a delete & add.

@JakobJingleheimer That's simply not true. git stores trees of blobs; it does not record operations. It does not matter how you add new, modified, or deleted files to a git commit; ultimately, the commit will only record the new tree. Whether git detects that a file has been renamed depends on the viewer's git configuration; it does not depend on the commit author or the committer.

tniessen avatar Sep 26 '22 00:09 tniessen

I definitely don't know the arcane inner workings of git, and I couldn't tell you how or why it would or wouldn't work. But I have anecdotally confirmed this particular behaviour many, many times (simply committing without git mv and git failing to register the rename, undoing the commit and re-doing with git mv and then it does register). Git does lose whatever special thing git mv does if that commit is undone (whatever GitHub Desktop does when the "undo" button is clicked).

JakobJingleheimer avatar Sep 26 '22 00:09 JakobJingleheimer

CI: https://ci.nodejs.org/job/node-test-pull-request/46798/

nodejs-github-bot avatar Sep 26 '22 01:09 nodejs-github-bot

I definitely don't know the arcane inner workings of git, and I couldn't tell you how or why it would or wouldn't work. But I have anecdotally confirmed this particular behaviour many, many times (simply committing without git mv and git failing to register the rename, undoing the commit and re-doing with git mv and then it does register).

@JakobJingleheimer I won't challenge your experience, but the official git FAQ is contrary to what you're saying here.

Git has a rename command git mv, but that is just for convenience. The effect is indistinguishable from removing the file and adding another with different name and the same content.

I'm going to hide this comment as "off topic" and would appreciate it if @JakobJingleheimer and @tniessen did the same with their comments, but that's a request and no more.

Trott avatar Sep 26 '22 02:09 Trott

CI: https://ci.nodejs.org/job/node-test-pull-request/46802/

nodejs-github-bot avatar Sep 26 '22 03:09 nodejs-github-bot

@Trott It looks like I can't from GitHub mobile. You're welcome to hide mine if you'd like (otherwise I'll do in a couple weeks when I'm back home).

PS Yes I've never been able to find any official documentation for it, to my great frustration.

JakobJingleheimer avatar Sep 26 '22 04:09 JakobJingleheimer

CI: https://ci.nodejs.org/job/node-test-pull-request/46805/

nodejs-github-bot avatar Sep 26 '22 04:09 nodejs-github-bot

Landed in 1e6153c09092aae046f46eb0841619b84cbba972

nodejs-github-bot avatar Sep 26 '22 06:09 nodejs-github-bot

Thank you for the contribution @MadhulikaSharma95!

tniessen avatar Sep 26 '22 09:09 tniessen