mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 21:19:50 +01:00
85496e94d3
PR-URL: https://github.com/nodejs/node/pull/28338 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
15 lines
315 B
JavaScript
15 lines
315 B
JavaScript
'use strict';
|
|
require('../common');
|
|
const { Writable } = require('stream');
|
|
const { Console } = require('console');
|
|
|
|
const stream = new Writable({
|
|
write() {
|
|
throw null; // eslint-disable-line no-throw-literal
|
|
}
|
|
});
|
|
|
|
const console = new Console({ stdout: stream });
|
|
|
|
console.log('test'); // Should not throw
|