chore: remove Node.js patch on Module.globalPaths (#31275)
* chore: remove Node.js patch on Module.globalPaths * chore: update patches Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
This commit is contained in:
parent
2a92d8f962
commit
959b657903
11 changed files with 36 additions and 35 deletions
|
@ -1,16 +1,18 @@
|
|||
const Module = require('module');
|
||||
const path = require('path');
|
||||
const v8 = require('v8');
|
||||
|
||||
Module.globalPaths.push(path.resolve(__dirname, '../spec/node_modules'));
|
||||
module.paths.push(path.resolve(__dirname, '../spec/node_modules'));
|
||||
|
||||
// Extra module paths which can be used to load Mocha reporters
|
||||
if (process.env.ELECTRON_TEST_EXTRA_MODULE_PATHS) {
|
||||
for (const modulePath of process.env.ELECTRON_TEST_EXTRA_MODULE_PATHS.split(':')) {
|
||||
Module.globalPaths.push(modulePath);
|
||||
module.paths.push(modulePath);
|
||||
}
|
||||
}
|
||||
|
||||
// Add search paths for loaded spec files
|
||||
require('../spec/global-paths')(module.paths);
|
||||
|
||||
// We want to terminate on errors, not throw up a dialog
|
||||
process.on('uncaughtException', (err) => {
|
||||
console.error('Unhandled exception in main spec runner:', err);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue