mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 12:55:22 +00:00
refactor tests in 3 categories unit, e2e and electron
This commit is contained in:
@@ -1,10 +1,7 @@
|
||||
const helpers = require("./global-setup");
|
||||
const fetch = require("node-fetch");
|
||||
const app = require("../../js/app.js");
|
||||
|
||||
describe("All font files from roboto.css should be downloadable", function () {
|
||||
helpers.setupTimeout(this);
|
||||
|
||||
let app;
|
||||
const fontFiles = [];
|
||||
// Statements below filters out all 'url' lines in the CSS file
|
||||
const fileContent = require("fs").readFileSync(__dirname + "/../../fonts/roboto.css", "utf8");
|
||||
@@ -18,20 +15,13 @@ describe("All font files from roboto.css should be downloadable", function () {
|
||||
}
|
||||
|
||||
beforeAll(function () {
|
||||
// Set config sample for use in test
|
||||
process.env.MM_CONFIG_FILE = "tests/configs/without_modules.js";
|
||||
|
||||
return helpers
|
||||
.startApplication({
|
||||
args: ["js/electron.js"]
|
||||
})
|
||||
.then(function (startedApp) {
|
||||
app = startedApp;
|
||||
});
|
||||
app.start();
|
||||
});
|
||||
|
||||
afterAll(function () {
|
||||
return helpers.stopApplication(app);
|
||||
app.stop();
|
||||
});
|
||||
|
||||
test.each(fontFiles)("should return 200 HTTP code for file '%s'", (fontFile, done) => {
|
||||
|
Reference in New Issue
Block a user