diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d780a5f..dcdf993a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ Thanks to: @dathbe. - [clock] Add CSS to prevent line breaking of sunset/sunrise time display (#3816) - [core] Enhance system information logging format and include additional env and RAM details (#3839, #3843) - [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) ### Updated diff --git a/jest.config.js b/jest.config.js index 0faea8b9..cc65330f 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,32 +1,37 @@ -module.exports = async () => { - return { - verbose: true, - testTimeout: 20000, - testSequencer: "/tests/utils/test_sequencer.js", - projects: [ - { - displayName: "unit", - globalSetup: "/tests/unit/helpers/global-setup.js", - moduleNameMapper: { - logger: "/js/logger.js" - }, - testMatch: ["**/tests/unit/**/*.[jt]s?(x)"], - testPathIgnorePatterns: ["/tests/unit/mocks", "/tests/unit/helpers"] +const config = { + verbose: true, + testTimeout: 20000, + testSequencer: "/tests/utils/test_sequencer.js", + projects: [ + { + displayName: "unit", + globalSetup: "/tests/unit/helpers/global-setup.js", + moduleNameMapper: { + logger: "/js/logger.js" }, - { - displayName: "electron", - testMatch: ["**/tests/electron/**/*.[jt]s?(x)"], - testPathIgnorePatterns: ["/tests/electron/helpers"] - }, - { - displayName: "e2e", - testMatch: ["**/tests/e2e/**/*.[jt]s?(x)"], - modulePaths: ["/js/"], - testPathIgnorePatterns: ["/tests/e2e/helpers", "/tests/e2e/mocks"] - } - ], - collectCoverageFrom: ["./clientonly/**/*.js", "./js/**/*.js", "./modules/default/**/*.js", "./serveronly/**/*.js"], - coverageReporters: ["lcov", "text"], - coverageProvider: "v8" - }; + testMatch: ["**/tests/unit/**/*.[jt]s?(x)"], + testPathIgnorePatterns: ["/tests/unit/mocks", "/tests/unit/helpers"] + }, + { + displayName: "electron", + testMatch: ["**/tests/electron/**/*.[jt]s?(x)"], + testPathIgnorePatterns: ["/tests/electron/helpers"] + }, + { + displayName: "e2e", + testMatch: ["**/tests/e2e/**/*.[jt]s?(x)"], + modulePaths: ["/js/"], + testPathIgnorePatterns: ["/tests/e2e/helpers", "/tests/e2e/mocks"] + } + ], + collectCoverageFrom: [ + "/clientonly/**/*.js", + "/js/**/*.js", + "/modules/default/**/*.js", + "/serveronly/**/*.js" + ], + coverageReporters: ["lcov", "text"], + coverageProvider: "v8" }; + +module.exports = config;