mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 11:50:00 +00:00
17 lines
323 B
JavaScript
17 lines
323 B
JavaScript
|
exports.startApplication = function (configFilename, exec) {
|
||
|
jest.resetModules();
|
||
|
// Set config sample for use in test
|
||
|
process.env.MM_CONFIG_FILE = configFilename;
|
||
|
if (exec) exec;
|
||
|
const app = require("app.js");
|
||
|
app.start();
|
||
|
|
||
|
return app;
|
||
|
};
|
||
|
|
||
|
exports.stopApplication = function (app) {
|
||
|
if (app) {
|
||
|
app.stop();
|
||
|
}
|
||
|
};
|