diff --git a/js/loader.js b/js/loader.js index 31cf7cc0f4..a4fe273f01 100644 --- a/js/loader.js +++ b/js/loader.js @@ -1,6 +1,5 @@ /* global defaultModules, vendor */ -// eslint-disable-next-line no-unused-vars const Loader = (function () { /* Create helper variables */ @@ -295,3 +294,5 @@ const Loader = (function () { } }; }()); + +globalThis.Loader = Loader; diff --git a/js/socketclient.js b/js/socketclient.js index 0c3a7c6691..1f7b3f3a4c 100644 --- a/js/socketclient.js +++ b/js/socketclient.js @@ -1,6 +1,5 @@ /* global io */ -// eslint-disable-next-line no-unused-vars const MMSocket = function (moduleName) { if (typeof moduleName !== "string") { throw new Error("Please set the module name for the MMSocket."); @@ -45,3 +44,5 @@ const MMSocket = function (moduleName) { this.socket.emit(notification, payload); }; }; + +globalThis.MMSocket = MMSocket; diff --git a/tests/e2e/port_spec.js b/tests/e2e/port_spec.js index 341becc76b..8638d0e418 100644 --- a/tests/e2e/port_spec.js +++ b/tests/e2e/port_spec.js @@ -24,6 +24,7 @@ describe("port directive configuration", () => { afterAll(async () => { await helpers.stopApplication(); + delete process.env.MM_PORT; }); it("should return 200", async () => { diff --git a/tests/electron/modules/calendar_spec.js b/tests/electron/modules/calendar_spec.js index c37f3a434c..655e7e59c8 100644 --- a/tests/electron/modules/calendar_spec.js +++ b/tests/electron/modules/calendar_spec.js @@ -22,20 +22,6 @@ describe("Calendar module", () => { return await loc.count(); }; - /** - * Use this for debugging broken tests, it will console log the text of the calendar module - * @returns {Promise} - */ - // eslint-disable-next-line no-unused-vars - const logAllText = async () => { - expect(global.page).not.toBeNull(); - const loc = await global.page.locator(".calendar .event"); - const elem = loc.first(); - await elem.waitFor(); - expect(elem).not.toBeNull(); - console.log(await loc.allInnerTexts()); - }; - const first = 0; const second = 1; const third = 2;