mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 19:53:36 +00:00
- order (external first) - remove superfluous file extensions - new line after imports - deconstruct (only one time (in `check_config.js`)) - fix path (only one time (in `global-setup.js`))
20 lines
548 B
JavaScript
20 lines
548 B
JavaScript
const { injectMockData } = require("../../utils/weather_mocker");
|
|
const helpers = require("./global-setup");
|
|
|
|
exports.getText = async (element, result) => {
|
|
const elem = await helpers.getElement(element);
|
|
await expect(elem).not.toBe(null);
|
|
const text = await elem.textContent();
|
|
await expect(
|
|
text
|
|
.trim()
|
|
.replace(/(\r\n|\n|\r)/gm, "")
|
|
.replace(/[ ]+/g, " ")
|
|
).toBe(result);
|
|
};
|
|
|
|
exports.startApp = async (configFileNameName, systemDate) => {
|
|
injectMockData(configFileNameName);
|
|
await helpers.startApplication("", systemDate);
|
|
};
|