diff options
author | cjihrig <cjihrig@gmail.com> | 2019-01-15 15:39:43 -0500 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2019-01-17 16:32:21 -0500 |
commit | f6cd4e3e5976ce9edccdb13933028bdc95d43df4 (patch) | |
tree | 4eb1583e5776f3b544e4096e67b72d54cbca28ef /test/parallel/test-process-umask.js | |
parent | 1375af204a30d1885b9e8bf79725cbd223707439 (diff) | |
download | android-node-v8-f6cd4e3e5976ce9edccdb13933028bdc95d43df4.tar.gz android-node-v8-f6cd4e3e5976ce9edccdb13933028bdc95d43df4.tar.bz2 android-node-v8-f6cd4e3e5976ce9edccdb13933028bdc95d43df4.zip |
process: allow reading umask in workers
Refs: https://github.com/nodejs/node/issues/25448
PR-URL: https://github.com/nodejs/node/pull/25526
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Diffstat (limited to 'test/parallel/test-process-umask.js')
-rw-r--r-- | test/parallel/test-process-umask.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/test/parallel/test-process-umask.js b/test/parallel/test-process-umask.js index b1e0c08bcb..592463eca1 100644 --- a/test/parallel/test-process-umask.js +++ b/test/parallel/test-process-umask.js @@ -22,8 +22,15 @@ 'use strict'; const common = require('../common'); const assert = require('assert'); -if (!common.isMainThread) - common.skip('process.umask is not available in Workers'); + +if (!common.isMainThread) { + assert.strictEqual(typeof process.umask(), 'number'); + assert.throws(() => { + process.umask('0664'); + }, { code: 'ERR_WORKER_UNSUPPORTED_OPERATION' }); + + common.skip('Setting process.umask is not supported in Workers'); +} // Note in Windows one can only set the "user" bits. let mask; |