jest setup changes, increase setMaxListeners, disable console.log in tests/unit/global_vars

This commit is contained in:
Karsten Hassel
2021-06-12 20:03:20 +02:00
parent 298542b531
commit a5f7c946cc
5 changed files with 30 additions and 6 deletions

View File

@@ -7,6 +7,7 @@
const Application = require("spectron").Application;
const assert = require("assert");
const path = require("path");
const EventEmitter = require("events");
exports.getElectronPath = function () {
let electronPath = path.join(__dirname, "..", "..", "node_modules", ".bin", "electron");
@@ -26,6 +27,9 @@ exports.setupTimeout = function (test) {
};
exports.startApplication = function (options) {
const emitter = new EventEmitter();
emitter.setMaxListeners(100);
options.path = exports.getElectronPath();
if (process.env.CI) {
options.startTimeout = 30000;