Skip to content

Commit d661e2e

Browse files
committed
feat: replace jasmine/karma by jest
1 parent 6d283af commit d661e2e

File tree

7 files changed

+10142
-4793
lines changed

7 files changed

+10142
-4793
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
npm run lint
2626
npm run audit:prod
2727
npm run build
28-
npm test -- --code-coverage
28+
npm test -- --coverage
2929
3030
- name: Coveralls
3131
uses: coverallsapp/github-action@v2

angular.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,14 @@
2929
"defaultConfiguration": "production"
3030
},
3131
"test": {
32-
"builder": "@angular-devkit/build-angular:karma",
32+
"builder": "@angular-builders/jest:run",
3333
"options": {
34-
"karmaConfig": "./karma.conf.js",
34+
"configPath": "./jest.config.ts",
3535
"polyfills": [
3636
"zone.js",
3737
"zone.js/testing"
3838
],
3939
"tsConfig": "./tsconfig.spec.json",
40-
"inlineStyleLanguage": "scss",
4140
"watch": false
4241
}
4342
},

jest.config.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import type { Config } from 'jest';
2+
3+
export default {
4+
preset: 'jest-preset-angular',
5+
coverageReporters: ["lcovonly"],
6+
coverageDirectory: './coverage',
7+
verbose: true
8+
} satisfies Config;

karma.conf.js

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

0 commit comments

Comments
 (0)