mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-22 05:07:05 +00:00
update jest to v30 (#3815)
e2e: - needed window.close(), otherwise the objects are not destroyed - add missing `await` in clock test - set maxListeners for all tests remaining todo (comes with another PR if I find the problem): - calendar e2e is now the only test which still needs `--forceExit`
This commit is contained in:
@@ -33,7 +33,14 @@ exports.startApplication = async (configFilename, exec) => {
|
||||
return global.app.start();
|
||||
};
|
||||
|
||||
exports.stopApplication = async () => {
|
||||
exports.stopApplication = async (waitTime = 1000) => {
|
||||
if (global.window) {
|
||||
// no closing causes jest errors and memory leaks
|
||||
global.window.close();
|
||||
delete global.window;
|
||||
// give above closing some extra time to finish
|
||||
await new Promise((resolve) => setTimeout(resolve, waitTime));
|
||||
}
|
||||
if (!global.app) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
Reference in New Issue
Block a user