summaryrefslogtreecommitdiff
path: root/test/parallel/test-process-prototype.js
diff options
context:
space:
mode:
authorBryan English <bryan@bryanenglish.com>2016-10-26 15:21:36 -0700
committerAnna Henningsen <anna@addaleax.net>2017-03-25 00:33:20 +0100
commite0bc5a7361b1d29c3ed034155fd779ce6f44fb13 (patch)
tree4adc41ee23c2b750639264a1bb7f958da27ad56f /test/parallel/test-process-prototype.js
parent2141d374527337f7e1c74c9efad217b017d945cf (diff)
downloadandroid-node-v8-e0bc5a7361b1d29c3ed034155fd779ce6f44fb13.tar.gz
android-node-v8-e0bc5a7361b1d29c3ed034155fd779ce6f44fb13.tar.bz2
android-node-v8-e0bc5a7361b1d29c3ed034155fd779ce6f44fb13.zip
process: maintain constructor descriptor
Use the original property descriptor instead of just taking the value, which would, by default, be non-writable and non-configurable. PR-URL: https://github.com/nodejs/node/pull/9306 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Diffstat (limited to 'test/parallel/test-process-prototype.js')
-rw-r--r--test/parallel/test-process-prototype.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/parallel/test-process-prototype.js b/test/parallel/test-process-prototype.js
new file mode 100644
index 0000000000..0a0de8123d
--- /dev/null
+++ b/test/parallel/test-process-prototype.js
@@ -0,0 +1,15 @@
+'use strict';
+require('../common');
+const assert = require('assert');
+const EventEmitter = require('events');
+
+const proto = Object.getPrototypeOf(process);
+
+assert(proto instanceof EventEmitter);
+
+const desc = Object.getOwnPropertyDescriptor(proto, 'constructor');
+
+assert.strictEqual(desc.value, process.constructor);
+assert.strictEqual(desc.writable, true);
+assert.strictEqual(desc.enumerable, false);
+assert.strictEqual(desc.configurable, true);