Skip to content

Commit f85ef97

Browse files
committed
test: log errors in test-fs-readfile-tostring-fail
The test writes out a large file via `fs.createWriteStream()` but was not listening for the `error` event, which the `fs` docs describe as the reliable way to detect write errors. PR-URL: #27058 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent 53e0f63 commit f85ef97

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/pummel/test-fs-readfile-tostring-fail.js

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ const stream = fs.createWriteStream(file, {
2121
flags: 'a'
2222
});
2323

24+
stream.on('error', (err) => { throw err; });
25+
2426
const size = kStringMaxLength / 200;
2527
const a = Buffer.alloc(size, 'a');
2628

0 commit comments

Comments
 (0)