mirror of
https://github.com/nodejs/node.git
synced 2025-05-11 01:27:14 +00:00

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>
16 lines
450 B
JavaScript
16 lines
450 B
JavaScript
'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);
|