From f3a38883076a3ffc227f062f0b80ff08ed5e79fe Mon Sep 17 00:00:00 2001 From: Jeremiah Senkpiel Date: Fri, 8 Jul 2016 14:22:14 +0200 Subject: test: move parallel/test-tty-* to pseudo-tty/ Refs: https://github.com/nodejs/node/pull/7360 PR-URL: https://github.com/nodejs/node/pull/7613 Reviewed-By: Colin Ihrig --- test/pseudo-tty/test-tty-stdout-end.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test/pseudo-tty/test-tty-stdout-end.js (limited to 'test/pseudo-tty/test-tty-stdout-end.js') diff --git a/test/pseudo-tty/test-tty-stdout-end.js b/test/pseudo-tty/test-tty-stdout-end.js new file mode 100644 index 0000000000..a33a2e5ed2 --- /dev/null +++ b/test/pseudo-tty/test-tty-stdout-end.js @@ -0,0 +1,15 @@ +'use strict'; +// Can't test this when 'make test' doesn't assign a tty to the stdout. +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); -- cgit v1.2.3