Skip to content

Commit

Permalink
Update test/parallel/test-internal-fs-syncwritestream.js
Browse files Browse the repository at this point in the history
Co-authored-by: Luigi Pinca <[email protected]>
  • Loading branch information
sungpaks and lpinca committed Sep 7, 2024
1 parent 5406ada commit 76ebf13
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/parallel/test-internal-fs-syncwritestream.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,10 @@ const filename = tmpdir.resolve('sync-write-stream.txt');
const fd = fs.openSync(filename, 'w');
const stream = new SyncWriteStream(fd, { autoClose: false });

stream.on('close', common.mustCall());

assert.strictEqual(stream.destroy(), stream);
fs.fstatSync(fd); // Does not throw
stream.on('close', common.mustCall());
fs.closeSync(fd);
}

Expand Down

0 comments on commit 76ebf13

Please sign in to comment.