-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
test: add implicit test for fs dispose handling with using #61140
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #61140 +/- ##
==========================================
- Coverage 88.53% 88.53% -0.01%
==========================================
Files 703 703
Lines 208546 208545 -1
Branches 40217 40225 +8
==========================================
- Hits 184634 184626 -8
+ Misses 15926 15917 -9
- Partials 7986 8002 +16 🚀 New features to boost your workflow:
|
|
Should we be waiting until ERM is no longer flagged in V8 to start introducing these? |
LiviaMedeiros
left a comment
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.
It's unflagged on v24.x and beyond, so it should be fine to land with appropriate dont-land-on-*s.
| async function implicitCall() { | ||
| { | ||
| await using fh = await fs.open(__filename); | ||
| fh.on('close', common.mustCall()); |
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 ensures only that fh is closed at some point, but we need to test that the filehandle is closed as soon as we exit the scope.
Add test for implicit fs calls with
await usingsyntax