mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-22 13:09:26 +00:00
refactor e2e
This commit is contained in:
16
tests/e2e/global-setup.js
Normal file
16
tests/e2e/global-setup.js
Normal file
@@ -0,0 +1,16 @@
|
||||
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();
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user