aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2022-05-26 11:20:00 +0200
committerLibravatar Kristóf Marussy <kristof@marussy.com>2022-05-27 21:07:44 +0200
commit4ed5115c2b06f204fd0aa3351d8acaee6884444f (patch)
tree121501617c3f3948ecf5911bfb13085dc994469d /packages
parenttest(shared): ServiceBase tests (diff)
downloadsophie-4ed5115c2b06f204fd0aa3351d8acaee6884444f.tar.gz
sophie-4ed5115c2b06f204fd0aa3351d8acaee6884444f.tar.zst
sophie-4ed5115c2b06f204fd0aa3351d8acaee6884444f.zip
build: fix test rootDir configuration
Each package should load the tests from its src directory only. Signed-off-by: Kristóf Marussy <kristof@marussy.com>
Diffstat (limited to 'packages')
-rw-r--r--packages/main/jest.config.js6
-rw-r--r--packages/main/jest.integ.config.cjs1
-rw-r--r--packages/preload/jest.config.js6
-rw-r--r--packages/renderer/jest.config.js5
-rw-r--r--packages/service-shared/tsconfig.json2
-rw-r--r--packages/shared/jest.config.js6
-rw-r--r--packages/shared/tsconfig.json9
-rw-r--r--packages/test-utils/tsconfig.json2
8 files changed, 24 insertions, 13 deletions
diff --git a/packages/main/jest.config.js b/packages/main/jest.config.js
index 9aaf344..c595d8d 100644
--- a/packages/main/jest.config.js
+++ b/packages/main/jest.config.js
@@ -1,4 +1,6 @@
1import baseConfig from '../../config/jest.config.base.js'; 1import baseConfig from '../../config/jest.config.base.js';
2 2
3// eslint-disable-next-line unicorn/prefer-export-from -- Can't export from default. 3export default {
4export default baseConfig; 4 ...baseConfig,
5 rootDir: 'src',
6};
diff --git a/packages/main/jest.integ.config.cjs b/packages/main/jest.integ.config.cjs
index 474d722..db767ab 100644
--- a/packages/main/jest.integ.config.cjs
+++ b/packages/main/jest.integ.config.cjs
@@ -5,6 +5,7 @@ const baseConfig = require('../../config/jest.config.base.cjs');
5/** @type {import('@jest/types').Config.InitialOptions} */ 5/** @type {import('@jest/types').Config.InitialOptions} */
6module.exports = { 6module.exports = {
7 ...baseConfig, 7 ...baseConfig,
8 rootDir: 'src',
8 globalSetup: path.join(__dirname, '../../config/electronJestGlobalSetup.cjs'), 9 globalSetup: path.join(__dirname, '../../config/electronJestGlobalSetup.cjs'),
9 globalTeardown: path.join( 10 globalTeardown: path.join(
10 __dirname, 11 __dirname,
diff --git a/packages/preload/jest.config.js b/packages/preload/jest.config.js
index 27af475..24aa9e2 100644
--- a/packages/preload/jest.config.js
+++ b/packages/preload/jest.config.js
@@ -1,7 +1,7 @@
1import rootConfig from '../../config/jest.config.base.js'; 1import baseConfig from '../../config/jest.config.base.js';
2 2
3/** @type {import('@jest/types').Config.InitialOptions} */ 3/** @type {import('@jest/types').Config.InitialOptions} */
4export default { 4export default {
5 ...rootConfig, 5 ...baseConfig,
6 testEnvironment: 'jsdom', 6 rootDir: 'src',
7}; 7};
diff --git a/packages/renderer/jest.config.js b/packages/renderer/jest.config.js
index 27af475..3abeb8b 100644
--- a/packages/renderer/jest.config.js
+++ b/packages/renderer/jest.config.js
@@ -1,7 +1,8 @@
1import rootConfig from '../../config/jest.config.base.js'; 1import baseConfig from '../../config/jest.config.base.js';
2 2
3/** @type {import('@jest/types').Config.InitialOptions} */ 3/** @type {import('@jest/types').Config.InitialOptions} */
4export default { 4export default {
5 ...rootConfig, 5 ...baseConfig,
6 rootDir: 'src',
6 testEnvironment: 'jsdom', 7 testEnvironment: 'jsdom',
7}; 8};
diff --git a/packages/service-shared/tsconfig.json b/packages/service-shared/tsconfig.json
index daad7c4..e0f7223 100644
--- a/packages/service-shared/tsconfig.json
+++ b/packages/service-shared/tsconfig.json
@@ -5,7 +5,7 @@
5 "emitDeclarationOnly": false, 5 "emitDeclarationOnly": false,
6 "declarationDir": null, 6 "declarationDir": null,
7 "noEmit": true, 7 "noEmit": true,
8 "rootDir": null 8 "rootDir": "../.."
9 }, 9 },
10 "include": ["src/**/*.ts", ".eslintrc.cjs", "esbuild.config.js"] 10 "include": ["src/**/*.ts", ".eslintrc.cjs", "esbuild.config.js"]
11} 11}
diff --git a/packages/shared/jest.config.js b/packages/shared/jest.config.js
index 9aaf344..c595d8d 100644
--- a/packages/shared/jest.config.js
+++ b/packages/shared/jest.config.js
@@ -1,4 +1,6 @@
1import baseConfig from '../../config/jest.config.base.js'; 1import baseConfig from '../../config/jest.config.base.js';
2 2
3// eslint-disable-next-line unicorn/prefer-export-from -- Can't export from default. 3export default {
4export default baseConfig; 4 ...baseConfig,
5 rootDir: 'src',
6};
diff --git a/packages/shared/tsconfig.json b/packages/shared/tsconfig.json
index daad7c4..eb1e81d 100644
--- a/packages/shared/tsconfig.json
+++ b/packages/shared/tsconfig.json
@@ -5,7 +5,12 @@
5 "emitDeclarationOnly": false, 5 "emitDeclarationOnly": false,
6 "declarationDir": null, 6 "declarationDir": null,
7 "noEmit": true, 7 "noEmit": true,
8 "rootDir": null 8 "rootDir": "../.."
9 }, 9 },
10 "include": ["src/**/*.ts", ".eslintrc.cjs", "esbuild.config.js"] 10 "include": [
11 "src/**/*.ts",
12 ".eslintrc.cjs",
13 "esbuild.config.js",
14 "jest.config.js"
15 ]
11} 16}
diff --git a/packages/test-utils/tsconfig.json b/packages/test-utils/tsconfig.json
index d01eb81..bca0327 100644
--- a/packages/test-utils/tsconfig.json
+++ b/packages/test-utils/tsconfig.json
@@ -5,7 +5,7 @@
5 "emitDeclarationOnly": false, 5 "emitDeclarationOnly": false,
6 "declarationDir": null, 6 "declarationDir": null,
7 "noEmit": true, 7 "noEmit": true,
8 "rootDir": null, 8 "rootDir": "../..",
9 "types": ["@types/jest", "node"] 9 "types": ["@types/jest", "node"]
10 }, 10 },
11 "include": ["src/**/*.ts", ".eslintrc.cjs"] 11 "include": ["src/**/*.ts", ".eslintrc.cjs"]