Skip to content

Commit

Permalink
added karma config
Browse files Browse the repository at this point in the history
  • Loading branch information
Aduril committed Dec 11, 2024
1 parent 5c2bfd7 commit 7a5257e
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@
"src/styles/custom-theme.scss",
"src/styles/styles.scss"
],
"scripts": []
"scripts": [],
"karmaConfig": "karma.conf.js"
}
}
}
Expand Down
45 changes: 45 additions & 0 deletions frontend/karma.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html

module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
jasmine: {
// you can add configuration options for Jasmine here
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
// for example, you can disable the random execution with `random: false`
// or set a specific seed with `seed: 4321`
},
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
jasmineHtmlReporter: {
suppressAll: true // removes the duplicated traces
},
coverageReporter: {
dir: require('path').join(__dirname, './coverage/possible-x-portal'),
subdir: '.',
reporters: [
{ type: 'html' },
{ type: 'text-summary' }
]
},
reporters: ['progress', 'kjhtml'],
browsers: ['ChromeHeadlessNoSandbox'],
customLaunchers: {
ChromeHeadlessNoSandbox: {
base: 'ChromeHeadless',
flags: ['--no-sandbox']
}
},
restartOnFileChange: true
});
};

0 comments on commit 7a5257e

Please sign in to comment.