mirror of
https://github.com/nodejs/node.git
synced 2025-05-14 15:26:29 +00:00

test-tty-wrap hasn’t worked since StreamBase was introduced, I think. test-tty-stdout-end also happens to works with PipeWrap-s. Refs: https://github.com/nodejs/node/pull/7360 PR-URL: https://github.com/nodejs/node/pull/7613 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
15 lines
300 B
JavaScript
15 lines
300 B
JavaScript
'use strict';
|
|
require('../common');
|
|
const assert = require('assert');
|
|
|
|
const shouldThrow = function() {
|
|
process.stdout.end();
|
|
};
|
|
|
|
const validateError = function(e) {
|
|
return e instanceof Error &&
|
|
e.message === 'process.stdout cannot be closed.';
|
|
};
|
|
|
|
assert.throws(shouldThrow, validateError);
|