summaryrefslogtreecommitdiff
path: root/test/sequential/test-child-process-emfile.js
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2015-10-12 20:48:41 -0700
committerRich Trott <rtrott@gmail.com>2015-10-13 18:27:47 -0700
commite3d9d25083fe022015d7ee6b07fe3212bb3dde2b (patch)
treed3f4175df8c472f051df29c284549d2b5c5fddd5 /test/sequential/test-child-process-emfile.js
parent2d3560767e6da62ceb0e5189c8f0b9a8f0a0924d (diff)
downloadandroid-node-v8-e3d9d25083fe022015d7ee6b07fe3212bb3dde2b.tar.gz
android-node-v8-e3d9d25083fe022015d7ee6b07fe3212bb3dde2b.tar.bz2
android-node-v8-e3d9d25083fe022015d7ee6b07fe3212bb3dde2b.zip
test: add test-child-process-emfile fail message
When the test fails (as it does frequently on FreeBSD unfortunately) provide a non-cryptic error message that also provides a line number. PR-URL: https://github.com/nodejs/node/pull/3335 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'test/sequential/test-child-process-emfile.js')
-rw-r--r--test/sequential/test-child-process-emfile.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/sequential/test-child-process-emfile.js b/test/sequential/test-child-process-emfile.js
index c4c467c339..ae7964d9e7 100644
--- a/test/sequential/test-child-process-emfile.js
+++ b/test/sequential/test-child-process-emfile.js
@@ -27,8 +27,10 @@ proc.on('error', common.mustCall(function(err) {
assert(err.code === 'EMFILE' || err.code === 'ENFILE');
}));
-// 'exit' should not be emitted, the process was never spawned.
-proc.on('exit', assert.fail);
+proc.on('exit', function() {
+ const msg = '"exit" should not be emitted (the process never spawned!)';
+ assert.fail(null, null, msg);
+});
// close one fd for LSan
if (openFds.length >= 1) {