diff options
| author | Armand Philippot <git@armandphilippot.com> | 2023-09-19 18:13:57 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2023-09-19 19:12:31 +0200 |
| commit | 2faf2e34331703b3bdea3eb487cb8799c8d65377 (patch) | |
| tree | dedc6557ddaa8fedd42d9bdf77950f8f9168ebcb /jest.config.js | |
| parent | d1fe9e2164fc5c8fd767b456eecc2a4eb929a33f (diff) | |
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.
Diffstat (limited to 'jest.config.js')
| -rw-r--r-- | jest.config.js | 15 |
1 files changed, 0 insertions, 15 deletions
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', '<rootDir>/'], - // 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/(.*)$': '<rootDir>/src/i18n/$1', - '^@assets/(.*)$': '<rootDir>/src/assets/$1', - '^@content/(.*)$': '<rootDir>/src/content/$1', - '^@components/(.*)$': '<rootDir>/src/components/$1', - '^@pages/(.*)$': '<rootDir>/src/pages/$1', - '^@services/(.*)$': '<rootDir>/src/services/$1', - '^@styles/(.*)$': '<rootDir>/src/styles/$1', - '^@tests/(.*)$': '<rootDir>/tests/$1', - '^@ts/(.*)$': '<rootDir>/src/ts/$1', - '^@utils/(.*)$': '<rootDir>/src/utils/$1', - }, - // Add more setup options before each test is run setupFilesAfterEnv: ['<rootDir>/jest.setup.js'], |
