refactor e2e

This commit is contained in:
Karsten Hassel
2021-09-16 22:36:18 +02:00
parent c15b31b374
commit 9969fede35
9 changed files with 65 additions and 59 deletions

16
tests/e2e/global-setup.js Normal file
View 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();
}
};