diff --git a/test/parallel/test-worker-unsupported-things.js b/test/parallel/test-worker-unsupported-things.js index a9f434eeaf55bb..18c1617c3cde5e 100644 --- a/test/parallel/test-worker-unsupported-things.js +++ b/test/parallel/test-worker-unsupported-things.js @@ -24,6 +24,14 @@ if (!process.env.HAS_STARTED_WORKER) { assert.strictEqual(process.debugPort, before); } + { + const mask = 0o600; + assert.throws(() => { process.umask(mask); }, { + code: 'ERR_WORKER_UNSUPPORTED_OPERATION', + message: 'Setting process.umask() is not supported in workers' + }); + } + const stubs = ['abort', 'chdir', 'send', 'disconnect']; if (!common.isWindows) { @@ -35,13 +43,19 @@ if (!process.env.HAS_STARTED_WORKER) { assert.strictEqual(process[fn].disabled, true); assert.throws(() => { process[fn](); - }, { code: 'ERR_WORKER_UNSUPPORTED_OPERATION' }); + }, { + code: 'ERR_WORKER_UNSUPPORTED_OPERATION', + message: `process.${fn}() is not supported in workers` + }); }); ['channel', 'connected'].forEach((fn) => { assert.throws(() => { process[fn]; // eslint-disable-line no-unused-expressions - }, { code: 'ERR_WORKER_UNSUPPORTED_OPERATION' }); + }, { + code: 'ERR_WORKER_UNSUPPORTED_OPERATION', + message: `process.${fn} is not supported in workers` + }); }); assert.strictEqual('_startProfilerIdleNotifier' in process, false);