All files / lib/internal/main run_main_module.js

100% Statements 17/17
100% Branches 1/1
100% Functions 0/0
100% Lines 17/17

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 183750x 3750x 3750x 3750x 3750x 3750x 3750x 3750x 3750x 3750x 3750x 3750x 3750x 3750x 3750x 3750x 3750x  
'use strict';
 
const {
  prepareMainThreadExecution
} = require('internal/bootstrap/pre_execution');
 
prepareMainThreadExecution(true);
 
markBootstrapComplete();
 
// Note: this loads the module through the ESM loader if the module is
// determined to be an ES module. This hangs from the CJS module loader
// because we currently allow monkey-patching of the module loaders
// in the preloaded scripts through require('module').
// runMain here might be monkey-patched by users in --require.
// XXX: the monkey-patchability here should probably be deprecated.
require('internal/modules/cjs/loader').Module.runMain(process.argv[1]);