summaryrefslogtreecommitdiff
path: root/test/parallel/test-child-process-spawnsync-validation-errors.js
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2017-09-13 00:22:45 -0400
committercjihrig <cjihrig@gmail.com>2017-10-16 16:19:54 -0400
commit3b7a9a2589a55f3c4cb9abc2162351b22aec6973 (patch)
tree23c84eb5822bc1712b139ca71f692f8047a4b8f7 /test/parallel/test-child-process-spawnsync-validation-errors.js
parente2015b53477845513d87a6750a87019b37213943 (diff)
downloadnode-new-3b7a9a2589a55f3c4cb9abc2162351b22aec6973.tar.gz
child_process: add windowsHide option
This commit exposes the UV_PROCESS_WINDOWS_HIDE flag in Node as a windowsHide option to the child_process methods. The option is only applicable to Windows, and is ignored elsewhere. Fixes: https://github.com/nodejs/node/issues/15217 PR-URL: https://github.com/nodejs/node/pull/15380 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test/parallel/test-child-process-spawnsync-validation-errors.js')
-rw-r--r--test/parallel/test-child-process-spawnsync-validation-errors.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/parallel/test-child-process-spawnsync-validation-errors.js b/test/parallel/test-child-process-spawnsync-validation-errors.js
index e586037e1d..0a1cc2ca57 100644
--- a/test/parallel/test-child-process-spawnsync-validation-errors.js
+++ b/test/parallel/test-child-process-spawnsync-validation-errors.js
@@ -125,6 +125,22 @@ if (!common.isWindows) {
}
{
+ // Validate the windowsHide option
+ const err = /^TypeError: "windowsHide" must be a boolean$/;
+
+ pass('windowsHide', undefined);
+ pass('windowsHide', null);
+ pass('windowsHide', true);
+ pass('windowsHide', false);
+ fail('windowsHide', 0, err);
+ fail('windowsHide', 1, err);
+ fail('windowsHide', __dirname, err);
+ fail('windowsHide', [], err);
+ fail('windowsHide', {}, err);
+ fail('windowsHide', common.mustNotCall(), err);
+}
+
+{
// Validate the windowsVerbatimArguments option
const err = /^TypeError: "windowsVerbatimArguments" must be a boolean$/;