Welcome to mirror list, hosted at ThFree Co, Russian Federation.

test-tty-stdout-end.js « parallel « test - github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a2f3ad12f4aca7771ed2aaca97b957d67262ad6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Can't test this when 'make test' doesn't assign a tty to the stdout.
var common = require('../common');
var assert = require('assert');

var exceptionCaught = false;

try {
  process.stdout.end();
} catch (e) {
  exceptionCaught = true;
  assert.ok(common.isError(e));
  assert.equal('process.stdout cannot be closed.', e.message);
}

assert.ok(exceptionCaught);