tests: add setupDOMEnvironment helper function to eliminate repetitive JSDOM setup code (#3860)

The helper function allows to remove a lot of repetitive code, making
the tests clearer and easier to maintain.
This commit is contained in:
Kristjan ESPERANTO
2025-08-19 22:46:59 +02:00
committed by GitHub
parent 1b31cf19e9
commit 83d15aaaaa
3 changed files with 70 additions and 102 deletions

View File

@@ -20,6 +20,7 @@ Thanks to: @dathbe.
- [refactor] Add new file `js/module_functions.js` to move code used in several modules to one place (#3837)
- [tests] refactor: simplify jest config file (#3844)
- [tests] refactor: extract constants for weather electron tests (#3845)
- [tests] refactor: add `setupDOMEnvironment` helper function to eliminate repetitive JSDOM setup code (#3860)
- [tests] replace `console` with `Log` in calendar `debug.js` to avoid exception in eslint config (#3846)
- [tests] speed up e2e tests, cleanup and stabilize weather e2e tests (#3847, #3848)