mirror of https://github.com/nodejs/node.git
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);
|