Skip to content

Commit

Permalink
feat(core): Finish jest setting leftovers (squash)
Browse files Browse the repository at this point in the history
-Add jsdom  as a testEnvironment to run client code in browser setting instead of node
- Resolve moduleNameMapper complie failures for absolute imports with @ sign for jest to compile properly
- Add watch mode command to the pckge.json scripts list
- Fix all broken tests and mock DIs

Updated diagram
  • Loading branch information
Walid Bouguima authored and falberthen committed Feb 24, 2024
1 parent d854878 commit 6fd3c97
Show file tree
Hide file tree
Showing 12 changed files with 6,006 additions and 10,598 deletions.
Binary file modified images/diagram.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions src/EcommerceDDD.Spa/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@

module.exports = {
preset: 'jest-preset-angular',
moduleDirectories: [ "node_modules", "src"],

setupFilesAfterEnv: ['<rootDir>/setup-jest.ts'],
testEnvironment: "jsdom",
moduleNameMapper: {
"@core/(.*)": "<rootDir>/src/app/core/$1",
"@ecommerce/(.*)": "<rootDir>/src/app/modules/ecommerce/$1",
"@authentication/(.*)": "<rootDir>/src/app/modules/authentication/$1",
"@shared/(.*)": "<rootDir>/src/app/shared/$1",
"@environments/(.*)": "<rootDir>/src/environments/$1"
},
coveragePathIgnorePatterns: ["/models","/constants", "/environments"]
};
Loading

0 comments on commit 6fd3c97

Please sign in to comment.