nodejs-mozilla/test/fixtures/monkey-patch-run-main.js

9 lines
181 B
JavaScript

'use strict';
const oldRunMain = require('module').runMain;
require('module').runMain = function(...args) {
console.log('runMain is monkey patched!');
oldRunMain(...args);
};