summaryrefslogtreecommitdiff
path: root/test/pseudo-tty/test-tty-stdout-end.js
blob: 86a42c4035b7ae11ce838fd0c2e45d63b605e2c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
'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);