mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-09-13 23:55:11 +00:00
@@ -13,7 +13,6 @@ exports.getText = async (element, result) => {
|
||||
};
|
||||
|
||||
exports.startApp = async (configFileName, additionalMockData) => {
|
||||
injectMockData(configFileName, additionalMockData);
|
||||
await helpers.startApplication("");
|
||||
await helpers.startApplication(injectMockData(configFileName, additionalMockData));
|
||||
await helpers.getDocument();
|
||||
};
|
||||
|
@@ -1,9 +1,11 @@
|
||||
const helpers = require("../helpers/global-setup");
|
||||
const weatherFunc = require("../helpers/weather-functions");
|
||||
const { cleanupMockData } = require("../../utils/weather_mocker");
|
||||
|
||||
describe("Weather module", () => {
|
||||
afterAll(async () => {
|
||||
await helpers.stopApplication();
|
||||
await cleanupMockData();
|
||||
});
|
||||
|
||||
describe("Current weather", () => {
|
||||
|
@@ -1,9 +1,11 @@
|
||||
const helpers = require("../helpers/global-setup");
|
||||
const weatherFunc = require("../helpers/weather-functions");
|
||||
const { cleanupMockData } = require("../../utils/weather_mocker");
|
||||
|
||||
describe("Weather module: Weather Forecast", () => {
|
||||
afterAll(async () => {
|
||||
await helpers.stopApplication();
|
||||
await cleanupMockData();
|
||||
});
|
||||
|
||||
describe("Default configuration", () => {
|
||||
|
@@ -1,9 +1,11 @@
|
||||
const helpers = require("../helpers/global-setup");
|
||||
const weatherFunc = require("../helpers/weather-functions");
|
||||
const { cleanupMockData } = require("../../utils/weather_mocker");
|
||||
|
||||
describe("Weather module: Weather Hourly Forecast", () => {
|
||||
afterAll(async () => {
|
||||
await helpers.stopApplication();
|
||||
await cleanupMockData();
|
||||
});
|
||||
|
||||
describe("Default configuration", () => {
|
||||
|
@@ -1,3 +1,4 @@
|
||||
const fs = require("fs");
|
||||
const helpers = require("./helpers/global-setup");
|
||||
|
||||
describe("templated config with port variable", () => {
|
||||
@@ -6,6 +7,11 @@ describe("templated config with port variable", () => {
|
||||
});
|
||||
afterAll(async () => {
|
||||
await helpers.stopApplication();
|
||||
try {
|
||||
fs.unlinkSync("tests/configs/port_variable.js");
|
||||
} catch (err) {
|
||||
// do nothing
|
||||
}
|
||||
});
|
||||
|
||||
it("should return 200", async () => {
|
||||
|
Reference in New Issue
Block a user