Uh oh!
There was an error while loading. Please reload this page.
fs.watch error message includes filename - #2748
Conversation
There was a problem hiding this comment.
Can you use let instead of var, and a template string instead of concatenation.
cjihrig
commented
Sep 9, 2015
You changed two code paths, but only added a test for one. Can you test for the other too? |
charlierudolph
commented
Sep 9, 2015
Thanks for the review. Code comments addressed. I don't actually know how to test the other code path. which is an error occurring while watching a file. Any suggestions? |
There was a problem hiding this comment.
unfortunately it is. If the function doesn't return true, it throws the error.
sindresorhus
commented
Sep 9, 2015
Even if it's non-standard, might be worth going with camelCased |
cjihrig
commented
Sep 9, 2015
One important difference is that |
charlierudolph
commented
Sep 16, 2015
@cjihrig bump. Anything else this PR needs? |
There was a problem hiding this comment.
This can actually be const
cjihrig
commented
Sep 17, 2015
It LGTM, but I'd really like a test for the |
charlierudolph
commented
Sep 29, 2015
okay @cjihrig the emit path now has a test. |
There was a problem hiding this comment.
Instead of creating watcherErrorCaught, you can just wrap this function in common.mustCall(). That way you can ensure it was called, and fail the test if it's not.
cjihrig
commented
Sep 29, 2015
One comment, but this LGTM |
cjihrig
commented
Sep 29, 2015
Oh, and can you squash this down to a single commit? |
charlierudolph
commented
Sep 30, 2015
Switched to using common.mustCall and squashed to a single commit. |
cjihrig
commented
Sep 30, 2015
charlierudolph
commented
Sep 30, 2015
That build is very complex to traverse. Okay from the link provided I got to The build page shows another commit is being tested in addition to mine. |
thefourtheye
commented
Sep 30, 2015
Don't worry about that test. It fails often. |
This commit adds the relevant filename to fs.watch() errors. Refs: nodejs/node-v0.x-archive#25542 PR-URL: #2748 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
cjihrig
commented
Oct 2, 2015
Thanks! Landed in 87e820e |
Brought over from nodejs/node-v0.x-archive#25542