mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-22 05:07:05 +00:00
cleanup and try to stabilize weather e2e tests (#3848)
The weather e2e tests are failing sometimes, failing is not really reproducable. After changing `updateDom(0)` to `updateDom(300)` in `weather.js` it seems to work (we will se if it really works in the long term). This PR contains some other weather e2e changes/cleanups/simplifying.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
const fs = require("node:fs");
|
||||
const path = require("node:path");
|
||||
const util = require("node:util");
|
||||
const exec = util.promisify(require("node:child_process").exec);
|
||||
const exec = require("node:child_process").execSync;
|
||||
|
||||
/**
|
||||
* @param {string} type what data to read, can be "current" "forecast" or "hourly
|
||||
@@ -45,9 +44,9 @@ const injectMockData = (configFileName, extendedData = {}) => {
|
||||
return tempFile;
|
||||
};
|
||||
|
||||
const cleanupMockData = async () => {
|
||||
const cleanupMockData = () => {
|
||||
const tempDir = path.resolve(`${__dirname}/../configs`).toString();
|
||||
await exec(`find ${tempDir} -type f -name *_temp.js -delete`);
|
||||
exec(`find ${tempDir} -type f -name *_temp.js -delete`);
|
||||
};
|
||||
|
||||
module.exports = { injectMockData, cleanupMockData };
|
||||
|
Reference in New Issue
Block a user