From 2faf2e34331703b3bdea3eb487cb8799c8d65377 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Tue, 19 Sep 2023 18:13:57 +0200 Subject: refactor(build): replace paths aliases with relative paths Using paths aliases starting with "@" can be confusing and can lead to conflict with existings modules. I prefer to use relative paths to avoid extra configuration in tools because of these aliases. --- jest.config.js | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'jest.config.js') diff --git a/jest.config.js b/jest.config.js index 5a26772..d638a66 100644 --- a/jest.config.js +++ b/jest.config.js @@ -16,21 +16,6 @@ const customJestConfig = { // if using TypeScript with a baseUrl set to the root directory then you need the below for alias' to work moduleDirectories: ['node_modules', '/'], - // A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module - moduleNameMapper: { - /** Module Path Aliases */ - '^@i18n/(.*)$': '/src/i18n/$1', - '^@assets/(.*)$': '/src/assets/$1', - '^@content/(.*)$': '/src/content/$1', - '^@components/(.*)$': '/src/components/$1', - '^@pages/(.*)$': '/src/pages/$1', - '^@services/(.*)$': '/src/services/$1', - '^@styles/(.*)$': '/src/styles/$1', - '^@tests/(.*)$': '/tests/$1', - '^@ts/(.*)$': '/src/ts/$1', - '^@utils/(.*)$': '/src/utils/$1', - }, - // Add more setup options before each test is run setupFilesAfterEnv: ['/jest.setup.js'], -- cgit v1.2.3