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();