mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
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 <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
This commit is contained in:
committed by
Myles Borins
parent
396688f075
commit
b3d1700d1f
@@ -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, '');
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user