Skip to content

Commit

Permalink
Enhance test configuration and enable code coverage for CI
Browse files Browse the repository at this point in the history
Updated the Karma configuration to explicitly define the file type as TypeScript for test files. Added the `--code-coverage` flag to the CI test script to generate code coverage reports during continuous integration runs.
  • Loading branch information
dhAlcojor committed Aug 19, 2024
1 parent 4180468 commit e4bda30
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
module.exports = function (config) {
config.set({
basePath: "",
files: ["src/**/*.spec.ts"],
files: {
pattern: "src/**/*.spec.ts",
type: "typescript",
},
frameworks: ["jasmine", "@angular-devkit/build-angular"],
plugins: [
require("karma-jasmine"),
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test",
"test:ci": "ng test --no-watch --no-progress --browsers=ChromeHeadless",
"test:ci": "ng test --no-watch --no-progress --browsers=ChromeHeadless --code-coverage",
"test:watch": "ng test --watch --code-coverage"
},
"private": true,
Expand Down

0 comments on commit e4bda30

Please sign in to comment.