1/* eslint-disable strict */ 2require('../common'); 3const assert = require('assert'); 4const _process = require('process'); 5const { Buffer: _Buffer } = require('buffer'); 6 7assert.strictEqual(process, _process); 8// eslint-disable-next-line no-global-assign 9process = 'asdf'; 10assert.strictEqual(process, 'asdf'); 11assert.strictEqual(global.process, 'asdf'); 12global.process = _process; 13assert.strictEqual(process, _process); 14assert.strictEqual( 15 typeof Object.getOwnPropertyDescriptor(global, 'process').get, 16 'function'); 17 18assert.strictEqual(Buffer, _Buffer); 19// eslint-disable-next-line no-global-assign 20Buffer = 'asdf'; 21assert.strictEqual(Buffer, 'asdf'); 22assert.strictEqual(global.Buffer, 'asdf'); 23global.Buffer = _Buffer; 24assert.strictEqual(Buffer, _Buffer); 25assert.strictEqual( 26 typeof Object.getOwnPropertyDescriptor(global, 'Buffer').get, 27 'function'); 28