0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-21 21:19:50 +01:00
nodejs/test/parallel/test-child-process-exec-stdout-stderr-data-string.js
sreepurnajasti 4d74b52979 test: use common module API in test-child-process-exec-stdout-stderr-data-string
PR-URL: https://github.com/nodejs/node/pull/17751
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-12-23 22:58:17 -05:00

14 lines
413 B
JavaScript

'use strict';
// Refs: https://github.com/nodejs/node/issues/7342
const common = require('../common');
const assert = require('assert');
const exec = require('child_process').exec;
const command = common.isWindows ? 'dir' : 'ls';
exec(command).stdout.on('data', common.mustCallAtLeast());
exec('fhqwhgads').stderr.on('data', common.mustCallAtLeast((data) => {
assert.strictEqual(typeof data, 'string');
}));