From e038b2fa9aeaad9411e5bc57db937530020c3713 Mon Sep 17 00:00:00 2001 From: Masashi Hirano Date: Wed, 13 Jun 2018 21:49:47 +0900 Subject: [PATCH] test: assert process.setgroups is undefined on windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/21286 Reviewed-By: Michaƫl Zasso Reviewed-By: Richard Lau Reviewed-By: James M Snell Reviewed-By: Luigi Pinca --- test/parallel/test-process-setgroups.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/parallel/test-process-setgroups.js b/test/parallel/test-process-setgroups.js index 68c2e3e3ad048a..60a6e3e32ebe3d 100644 --- a/test/parallel/test-process-setgroups.js +++ b/test/parallel/test-process-setgroups.js @@ -1,7 +1,12 @@ 'use strict'; -require('../common'); +const common = require('../common'); const assert = require('assert'); +if (common.isWindows || !common.isMainThread) { + assert.strictEqual(process.setgroups, undefined); + return; +} + assert.throws( () => { process.setgroups();