Skip to content

Commit b21c9bc

Browse files
committed
feat: replace jasmin/karma by jest
1 parent 26346db commit b21c9bc

File tree

8 files changed

+7856
-5047
lines changed

8 files changed

+7856
-5047
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: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,15 @@
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",
41-
"watch": false,
42-
"scripts": [
43-
"node_modules/intl-tel-input/build/js/utils.js"
44-
]
40+
"watch": false
4541
}
4642
},
4743
"lint": {
@@ -57,6 +53,8 @@
5753
}
5854
},
5955
"cli": {
60-
"defaultCollection": "@angular-eslint/schematics"
56+
"schematicCollections": [
57+
"@angular-eslint/schematics"
58+
]
6159
}
6260
}

jest.config.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
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+
setupFilesAfterEnv: ['<rootDir>/node_modules/intl-tel-input/build/js/utils.js']
9+
} satisfies Config;

karma.conf.js

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

0 commit comments

Comments
 (0)