From b3d1700d1f8d31551ecfcab7560e91e40511337e Mon Sep 17 00:00:00 2001 From: Chase Starr Date: Wed, 11 Jan 2017 19:45:23 -0800 Subject: [PATCH] test: improve tests in pummel/test-exec * add asset.strictEqual to stdout and stderr. Fixes no-unused-vars. * replace double quotes with single PR-URL: https://github.com/nodejs/node/pull/10757 Reviewed-By: Rich Trott Reviewed-By: James M Snell Reviewed-By: Gibson Fahnestock Reviewed-By: Michael Dawson --- test/pummel/test-exec.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/pummel/test-exec.js b/test/pummel/test-exec.js index 6f6e1511b1..1840437331 100644 --- a/test/pummel/test-exec.js +++ b/test/pummel/test-exec.js @@ -63,6 +63,8 @@ exec(SLEEP3_COMMAND, { timeout: 50 }, function(err, stdout, stderr) { assert.ok(err); assert.ok(err.killed); assert.strictEqual(err.signal, 'SIGTERM'); + assert.strictEqual(stdout, ''); + assert.strictEqual(stderr, ''); }); @@ -85,6 +87,8 @@ function killMeTwiceCallback(err, stdout, stderr) { assert.ok(err); assert.ok(err.killed); assert.strictEqual(err.signal, 'SIGTERM'); + assert.strictEqual(stdout, ''); + assert.strictEqual(stderr, ''); // the timeout should still be in effect console.log('\'sleep 3\' was already killed. Took %d ms', diff); @@ -96,6 +100,8 @@ exec('python -c "print 200000*\'C\'"', {maxBuffer: 1000}, function(err, stdout, stderr) { assert.ok(err); assert.ok(/maxBuffer/.test(err.message)); + assert.strictEqual(stdout, ''); + assert.strictEqual(stderr, ''); });