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:
Karsten Hassel
2025-06-21 13:40:10 +02:00
committed by GitHub
parent 2809ed1750
commit d2d4d7b37f
7 changed files with 968 additions and 720 deletions

View File

@@ -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();
}