aboutsummaryrefslogtreecommitdiffstats
path: root/config/jest.config.base.js
diff options
context:
space:
mode:
Diffstat (limited to 'config/jest.config.base.js')
-rw-r--r--config/jest.config.base.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/config/jest.config.base.js b/config/jest.config.base.js
index f265c1c..87d5b31 100644
--- a/config/jest.config.base.js
+++ b/config/jest.config.base.js
@@ -2,7 +2,7 @@ import { join } from 'path';
2 2
3import { fileURLToDirname } from './utils.js'; 3import { fileURLToDirname } from './utils.js';
4 4
5const dirname = fileURLToDirname(import.meta.url); 5const thisDir = fileURLToDirname(import.meta.url);
6 6
7/** @type {import('ts-jest').InitialOptionsTsJest} */ 7/** @type {import('ts-jest').InitialOptionsTsJest} */
8export default { 8export default {
@@ -13,8 +13,11 @@ export default {
13 }, 13 },
14 }, 14 },
15 moduleNameMapper: { 15 moduleNameMapper: {
16 '@sophie/(.+)': join(dirname, '../packages/$1/src/index.ts'), 16 '@sophie/(.+)': join(thisDir, '../packages/$1/src/index.ts'),
17 '^(\\.{1,2}/.*)\\.js$': '$1', 17 '^(\\.{1,2}/.*)\\.js$': '$1',
18 // Workaround for typescript to recognize the vendored dependencies of chalk.
19 '#ansi-styles': join(thisDir, '../node_modules/chalk/source/vendor/ansi-styles/index.js'),
20 '#supports-color': join(thisDir, '../node_modules/chalk/source/vendor/supports-color/index.js'),
18 }, 21 },
19 resetMocks: true, 22 resetMocks: true,
20 restoreMocks: true, 23 restoreMocks: true,