|
@@ -5,10 +5,18 @@
|
|
|
// Deprecated APIs are still supported and should be tested.
|
|
|
process.throwDeprecation = false
|
|
|
|
|
|
+ const Module = require('module');
|
|
|
const path = require('path')
|
|
|
const electron = require('electron')
|
|
|
const { ipcRenderer } = electron
|
|
|
|
|
|
+ // 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);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
// Set up chai-as-promised here first to avoid conflicts
|
|
|
// It must be loaded first or really strange things happen inside
|
|
|
// chai that cause test failures
|