Skip to content

Commit

Permalink
#2014 added path aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
Viktor Patraboi committed Mar 17, 2023
1 parent 8e5f0d7 commit 9152256
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
8 changes: 8 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
module.exports = {
"moduleNameMapper": {
'^shared/(.*)$': '<rootDir>/src/app/shared/$1',
'^shared-services/(.*)$': '<rootDir>/src/app/shared/services/$1',
'^shared-components/(.*)$': '<rootDir>/src/app/shared/components/$1',
'^shared-enum/(.*)$': '<rootDir>/src/app/shared/enum/$1',
'^shared-models/(.*)$': '<rootDir>/src/app/shared/models/$1',
'^shared-constants/(.*)$': '<rootDir>/src/app/shared/constants/$1'
},
"preset": "jest-preset-angular",
"setupFilesAfterEnv": [
"<rootDir>/setup-jest.ts"
Expand Down
24 changes: 22 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,27 @@
"emitDecoratorMetadata": true,
"types": [
"jest"
],
],
"paths": {
"shared/*": [
"src/app/shared/*"
],
"shared-services/*": [
"src/app/shared/services/*"
],
"shared-components/*": [
"src/app/shared/components/*"
],
"shared-enum/*": [
"src/app/shared/enum/*"
],
"shared-models/*": [
"src/app/shared/models/*"
],
"shared-constants/*": [
"src/app/shared/constants/*"
]
},
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"sourceMap": true,
Expand All @@ -23,4 +43,4 @@
"dom"
]
}
}
}

0 comments on commit 9152256

Please sign in to comment.