Skip to content

Commit 5d70a7e

Browse files
faywaymanekinekko
andauthored
chore: add Jest + Examples & helpers (#74)
* Jest testing instead of Karma & Jasmine * refactor: use optional chaining Co-authored-by: Wassim Chegham <[email protected]> Co-authored-by: Fayçal Tirich <[email protected]> Co-authored-by: Wassim Chegham <[email protected]>
1 parent 9c68261 commit 5d70a7e

34 files changed

+12479
-7194
lines changed

angular.json

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -79,21 +79,10 @@
7979
}
8080
},
8181
"test": {
82-
"builder": "@angular-devkit/build-angular:karma",
82+
"builder": "@angular-builders/jest:run",
8383
"options": {
84-
"main": "src/test.ts",
85-
"polyfills": "src/polyfills.ts",
86-
"tsConfig": "tsconfig.spec.json",
87-
"karmaConfig": "karma.conf.js",
88-
"assets": [
89-
"src/favicon.ico",
90-
"src/assets"
91-
],
92-
"styles": [
93-
"./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
94-
"src/styles.css"
95-
],
96-
"scripts": []
84+
"jestConfig": "jest.config.js",
85+
"setupFilesAfterEnv": "<rootDir>/test-setup.ts"
9786
}
9887
},
9988
"lint": {
@@ -142,11 +131,10 @@
142131
}
143132
},
144133
"test": {
145-
"builder": "@angular-devkit/build-angular:karma",
134+
"builder": "@angular-builders/jest:run",
146135
"options": {
147-
"main": "projects/manekinekko/angular-web-bluetooth/src/test.ts",
148-
"tsConfig": "projects/manekinekko/angular-web-bluetooth/tsconfig.spec.json",
149-
"karmaConfig": "projects/manekinekko/angular-web-bluetooth/karma.conf.js"
136+
"jestConfig": "projects/manekinekko/angular-web-bluetooth/jest.config.js",
137+
"setupFilesAfterEnv": "./test-setup.ts"
150138
}
151139
},
152140
"lint": {

0 commit comments

Comments
 (0)