nodejs/test/parallel/test-timers-process-tampering.js
James M Snell 97a3a8204c test: replace more uses of global with globalThis
PR-URL: https://github.com/nodejs/node/pull/56712
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2025-01-25 07:23:11 +00:00

9 lines
306 B
JavaScript

// Check that setImmediate works even if process is tampered with.
// This is a regression test for https://github.com/nodejs/node/issues/17681.
'use strict';
const common = require('../common');
globalThis.process = {}; // Boom!
common.allowGlobals(globalThis.process);
setImmediate(common.mustCall());