| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -24,6 +24,14 @@ if (!process.env.HAS_STARTED_WORKER) { | |||
| 24 | 24 | assert.strictEqual(process.debugPort, before); | |
| 25 | 25 | } | |
| 26 | 26 | ||
| 27 | + { | ||
| 28 | + const mask = 0o600; | ||
| 29 | + assert.throws(() => { process.umask(mask); }, { | ||
| 30 | + code: 'ERR_WORKER_UNSUPPORTED_OPERATION', | ||
| 31 | + message: 'Setting process.umask() is not supported in workers' | ||
| 32 | + }); | ||
| 33 | + } | ||
| 34 | + | ||
| 27 | 35 | const stubs = ['abort', 'chdir', 'send', 'disconnect']; | |
| 28 | 36 | ||
| 29 | 37 | if (!common.isWindows) { | |
@@ -35,13 +43,19 @@ if (!process.env.HAS_STARTED_WORKER) { | |||
| 35 | 43 | assert.strictEqual(process[fn].disabled, true); | |
| 36 | 44 | assert.throws(() => { | |
| 37 | 45 | process[fn](); | |
| 38 | - }, { code: 'ERR_WORKER_UNSUPPORTED_OPERATION' }); | ||
| 46 | + }, { | ||
| 47 | + code: 'ERR_WORKER_UNSUPPORTED_OPERATION', | ||
| 48 | + message: `process.${fn}() is not supported in workers` | ||
| 49 | + }); | ||
| 39 | 50 | }); | |
| 40 | 51 | ||
| 41 | 52 | ['channel', 'connected'].forEach((fn) => { | |
| 42 | 53 | assert.throws(() => { | |
| 43 | 54 | process[fn]; // eslint-disable-line no-unused-expressions | |
| 44 | - }, { code: 'ERR_WORKER_UNSUPPORTED_OPERATION' }); | ||
| 55 | + }, { | ||
| 56 | + code: 'ERR_WORKER_UNSUPPORTED_OPERATION', | ||
| 57 | + message: `process.${fn} is not supported in workers` | ||
| 58 | + }); | ||
| 45 | 59 | }); | |
| 46 | 60 | ||
| 47 | 61 | assert.strictEqual('_startProfilerIdleNotifier' in process, false); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments