We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dd76f5f commit 74bd314Copy full SHA for 74bd314
test/parallel/test-console-instance.js
@@ -57,3 +57,13 @@ out.write = common.mustCall((d) => {
57
assert.doesNotThrow(() => {
58
Console(out, err);
59
});
60
+
61
+// Instance that does not ignore the stream errors.
62
+const c2 = new Console(out, err, false);
63
64
+out.write = () => { throw new Error('out'); };
65
+err.write = () => { throw new Error('err'); };
66
67
+assert.throws(() => c2.log('foo'), /^Error: out$/);
68
+assert.throws(() => c2.warn('foo'), /^Error: err$/);
69
+assert.throws(() => c2.dir('foo'), /^Error: out$/);
0 commit comments