Skip to content

Commit

Permalink
change varibale name from intest to mmTestMode
Browse files Browse the repository at this point in the history
  • Loading branch information
sdetweil committed Nov 12, 2024
1 parent ee33350 commit 30f20d6
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<script type="text/javascript">
window.mmVersion = "#VERSION#";
window.intest = "#TESTMODE#";
window.mmTestMode = "#TESTMODE#";
</script>
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const { getEnvVarsAsObj } = require(`${__dirname}/server_functions`);

// Get version number.
global.version = require(`${__dirname}/../package.json`).version;
global.intest = process.env.intest ? true : false;
global.mmTestMode = process.env.mmTestMode === "true" ? true : false;
Log.log(`Starting MagicMirror: v${global.version}`);

// Log system information.
Expand Down
2 changes: 1 addition & 1 deletion js/server_functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function geExpectedReceivedHeaders (url) {
function getHtml (req, res) {
let html = fs.readFileSync(path.resolve(`${global.root_path}/index.html`), { encoding: "utf8" });
html = html.replace("#VERSION#", global.version);
html = html.replace("#TESTMODE#", global.intest);
html = html.replace("#TESTMODE#", global.mmTestMode);

let configFile = "config/config.js";
if (typeof global.configuration_file !== "undefined") {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/helpers/global-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ exports.startApplication = async (configFilename, exec) => {
} else {
process.env.MM_CONFIG_FILE = configFilename;
}
process.env.intest = true;
process.env.mmTestMode = "true";
if (exec) exec;
global.app = require("../../../js/app");

Expand Down
2 changes: 1 addition & 1 deletion tests/electron/helpers/global-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ exports.startApplication = async (configFilename, systemDate = null, electronPar
if (systemDate) {
process.env.MOCK_DATE = systemDate;
}
process.env.intest = true;
process.env.mmTestMode = "true";

global.electronApp = await electron.launch({ args: electronParams });

Expand Down

0 comments on commit 30f20d6

Please sign in to comment.