Skip to content

Commit 88efb84

Browse files
refactor: simplify jest config by removing unnecessary function wrapper
1 parent 4a85633 commit 88efb84

File tree

1 file changed

+35
-35
lines changed

1 file changed

+35
-35
lines changed

jest.config.js

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
1-
module.exports = () => {
2-
return {
3-
verbose: true,
4-
testTimeout: 20000,
5-
testSequencer: "<rootDir>/tests/utils/test_sequencer.js",
6-
projects: [
7-
{
8-
displayName: "unit",
9-
globalSetup: "<rootDir>/tests/unit/helpers/global-setup.js",
10-
moduleNameMapper: {
11-
logger: "<rootDir>/js/logger.js"
12-
},
13-
testMatch: ["**/tests/unit/**/*.[jt]s?(x)"],
14-
testPathIgnorePatterns: ["<rootDir>/tests/unit/mocks", "<rootDir>/tests/unit/helpers"]
1+
const config = {
2+
verbose: true,
3+
testTimeout: 20000,
4+
testSequencer: "<rootDir>/tests/utils/test_sequencer.js",
5+
projects: [
6+
{
7+
displayName: "unit",
8+
globalSetup: "<rootDir>/tests/unit/helpers/global-setup.js",
9+
moduleNameMapper: {
10+
logger: "<rootDir>/js/logger.js"
1511
},
16-
{
17-
displayName: "electron",
18-
testMatch: ["**/tests/electron/**/*.[jt]s?(x)"],
19-
testPathIgnorePatterns: ["<rootDir>/tests/electron/helpers"]
20-
},
21-
{
22-
displayName: "e2e",
23-
testMatch: ["**/tests/e2e/**/*.[jt]s?(x)"],
24-
modulePaths: ["<rootDir>/js/"],
25-
testPathIgnorePatterns: ["<rootDir>/tests/e2e/helpers", "<rootDir>/tests/e2e/mocks"]
26-
}
27-
],
28-
collectCoverageFrom: [
29-
"<rootDir>/clientonly/**/*.js",
30-
"<rootDir>/js/**/*.js",
31-
"<rootDir>/modules/default/**/*.js",
32-
"<rootDir>/serveronly/**/*.js"
33-
],
34-
coverageReporters: ["lcov", "text"],
35-
coverageProvider: "v8"
36-
};
12+
testMatch: ["**/tests/unit/**/*.[jt]s?(x)"],
13+
testPathIgnorePatterns: ["<rootDir>/tests/unit/mocks", "<rootDir>/tests/unit/helpers"]
14+
},
15+
{
16+
displayName: "electron",
17+
testMatch: ["**/tests/electron/**/*.[jt]s?(x)"],
18+
testPathIgnorePatterns: ["<rootDir>/tests/electron/helpers"]
19+
},
20+
{
21+
displayName: "e2e",
22+
testMatch: ["**/tests/e2e/**/*.[jt]s?(x)"],
23+
modulePaths: ["<rootDir>/js/"],
24+
testPathIgnorePatterns: ["<rootDir>/tests/e2e/helpers", "<rootDir>/tests/e2e/mocks"]
25+
}
26+
],
27+
collectCoverageFrom: [
28+
"<rootDir>/clientonly/**/*.js",
29+
"<rootDir>/js/**/*.js",
30+
"<rootDir>/modules/default/**/*.js",
31+
"<rootDir>/serveronly/**/*.js"
32+
],
33+
coverageReporters: ["lcov", "text"],
34+
coverageProvider: "v8"
3735
};
36+
37+
module.exports = config;

0 commit comments

Comments
 (0)