Skip to content

Commit 61976ce

Browse files
Patrick CreutzburgPatrick Creutzburg
authored andcommitted
replace karma by jest
1 parent 8e7d1ec commit 61976ce

16 files changed

+8692
-5340
lines changed

angular.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,10 @@
8383
}
8484
},
8585
"test": {
86-
"builder": "@angular-devkit/build-angular:karma",
86+
"builder": "@angular-builders/jest:run",
8787
"options": {
88-
"main": "src/test.ts",
8988
"polyfills": "src/polyfills.ts",
9089
"tsConfig": "tsconfig.spec.json",
91-
"karmaConfig": "karma.conf.js",
9290
"assets": [
9391
"src/favicon.ico",
9492
"src/assets"
@@ -129,4 +127,4 @@
129127
}
130128
},
131129
"defaultProject": "design-patterns-in-angular"
132-
}
130+
}

jest.config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
moduleNameMapper: {
3+
'@core/(.*)': '<rootDir>/src/app/core/$1',
4+
},
5+
preset: 'jest-preset-angular',
6+
setupFilesAfterEnv: ['<rootDir>/setup-jest.ts'],
7+
};

karma.conf.js

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)