aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2021-12-31 02:26:51 +0100
committerLibravatar Kristóf Marussy <kristof@marussy.com>2021-12-31 02:26:51 +0100
commit91b0ebbed2c20b8659dbae6f3ff4924940983a09 (patch)
treea6136d87619c7fb84f3850c97433d1602c625981 /config
parenttest: Add tests for main package (diff)
downloadsophie-91b0ebbed2c20b8659dbae6f3ff4924940983a09.tar.gz
sophie-91b0ebbed2c20b8659dbae6f3ff4924940983a09.tar.zst
sophie-91b0ebbed2c20b8659dbae6f3ff4924940983a09.zip
build: Upgrade to chalk 5.0.0 anyways
Requires some workarounds for ts-jest to find the vendored dependencies.
Diffstat (limited to 'config')
-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,