mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-12-12 01:42:19 +00:00
Release 2.33.0 (#3903)
This commit is contained in:
committed by
GitHub
parent
62b0f7f26e
commit
b0c5924019
@@ -1,9 +1,13 @@
|
||||
const path = require("node:path");
|
||||
const os = require("node:os");
|
||||
const fs = require("node:fs");
|
||||
const jsdom = require("jsdom");
|
||||
|
||||
const indexFile = `${__dirname}/../../../index.html`;
|
||||
const cssFile = `${__dirname}/../../../css/custom.css`;
|
||||
// global absolute root path
|
||||
global.root_path = path.resolve(`${__dirname}/../../../`);
|
||||
|
||||
const indexFile = `${global.root_path}/index.html`;
|
||||
const cssFile = `${global.root_path}/css/custom.css`;
|
||||
const sampleCss = [
|
||||
".region.row3 {",
|
||||
" top: 0;",
|
||||
@@ -29,12 +33,12 @@ exports.startApplication = async (configFilename, exec) => {
|
||||
process.env.mmTestMode = "true";
|
||||
process.setMaxListeners(0);
|
||||
if (exec) exec;
|
||||
global.app = require("../../../js/app");
|
||||
global.app = require(`${global.root_path}/js/app`);
|
||||
|
||||
return global.app.start();
|
||||
};
|
||||
|
||||
exports.stopApplication = async (waitTime = 1000) => {
|
||||
exports.stopApplication = async (waitTime = 10) => {
|
||||
if (global.window) {
|
||||
// no closing causes jest errors and memory leaks
|
||||
global.window.close();
|
||||
|
||||
Reference in New Issue
Block a user