-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
test: increase fs.exists coverage #15963
Conversation
test/parallel/test-fs-exists.js
Outdated
@@ -30,6 +30,8 @@ fs.exists(f, common.mustCall(function(y) { | |||
assert.strictEqual(y, true); | |||
})); | |||
|
|||
fs.exists(f); |
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.
This should probably assert something.
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.
For instance,
assert.doesNotThrow(() => fs.exists(f));
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.
Thanks, I just fixed it.
test/parallel/test-fs-exists.js
Outdated
@@ -30,6 +30,8 @@ fs.exists(f, common.mustCall(function(y) { | |||
assert.strictEqual(y, true); | |||
})); | |||
|
|||
assert.doesNotThrow(fs.exists(f)); |
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.
This isn't quite right yet. In this case, fs.exists(f)
will be evaluated, and the return value will be passed to assert.doesNotThrow()
. If you wrap fs.exists(f)
in a function first, then it will be good to go. It would look like:
assert.doesNotThrow(() => { fs.exists(f); });
Ping @NigelKibodeaux |
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.
LGTM
CI failed with merge conflict. My guess it because of the different commeints. @NigelKibodeaux could you squash the commits down to 1 ? |
Hi @NigelKibodeaux, would you still like to follow up on this so that it can land in Node? Let me know if I can offer any pointers. Thanks for helping improve Node! |
70c18e1
to
e714c42
Compare
Hi @apapirovski, I'm attempting to squash my commits. I hope this works... |
@NigelKibodeaux seems to have worked 😄 I'll get a CI started and post a link shortly. Edit: oops, can you remove the merge commit. Let me know if you need pointers. |
3c5d976
to
7bcf844
Compare
I rebased and pushed for you 😃 CI: https://ci.nodejs.org/job/node-test-commit/13558/ (For further reference, NigelKibodeaux@6d9abdd is the original commit.) |
PR-URL: #15963 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Landed in 4ed152e, thank you! 🎉 |
Thanks!
…On Sat, Oct 28, 2017 at 1:51 PM Tobias Nießen ***@***.***> wrote:
Closed #15963 <#15963>.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#15963 (comment)>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AAY8dJlpNJxzY2xXq_PdfDPF2zK1ZC3Oks5sw6HfgaJpZM4Pw0Z1>
.
|
PR-URL: #15963 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
PR-URL: #15963 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
PR-URL: #15963 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
PR-URL: nodejs/node#15963 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
PR-URL: nodejs/node#15963 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
PR-URL: #15963 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
PR-URL: #15963 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
PR-URL: #15963 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
PR-URL: nodejs/node#15963 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Tests the case of calling
fs.exists
without a callback.Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test