-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
fs: ensure dir.read()
does not throw synchronously
#58228
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #58228 +/- ##
==========================================
+ Coverage 90.18% 90.20% +0.01%
==========================================
Files 629 629
Lines 186641 186641
Branches 36654 36667 +13
==========================================
+ Hits 168329 168353 +24
- Misses 11112 11115 +3
+ Partials 7200 7173 -27
🚀 New features to boost your workflow:
|
@@ -188,7 +188,7 @@ async function doAsyncIterThrowTest() { | |||
} | |||
} | |||
|
|||
await assert.rejects(async () => dir.read(), dirclosedError); | |||
await assert.rejects(dir.read(), dirclosedError); |
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.
hmm, the title says dir.close()
but the tests are looking at dir.read()
with the dirclosedError
. Just a bit confusing. Some additional code comments could help
dir.close()
does not throw synchronouslydir.read()
does not throw synchronously
PR-URL: nodejs#58228 Reviewed-By: LiviaMedeiros <[email protected]> Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: nodejs#58228 Reviewed-By: LiviaMedeiros <[email protected]> Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: #58228 Reviewed-By: LiviaMedeiros <[email protected]> Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
It's the promise version, it should return a rejected Promise, not throw.