Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ jobs:
- name: Run tests
run: |
export CHROME_BIN=/usr/bin/chromium-browser
CI=true npm run test-headless
CI=true npm run test-ci
env:
CI: true
working-directory: ./modules/ui
Expand Down
3 changes: 2 additions & 1 deletion modules/ui/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@
"inlineStyleLanguage": "scss",
"assets": ["src/favicon.ico", "src/assets"],
"styles": ["src/styles.scss"],
"scripts": []
"scripts": [],
"karmaConfig": "karma.conf.js"
}
},
"lint": {
Expand Down
43 changes: 43 additions & 0 deletions modules/ui/karma.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// 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`
},
},
jasmineHtmlReporter: {
suppressAll: true, // removes the duplicated traces
},
coverageReporter: {
dir: require('path').join(__dirname, './coverage/test-run-ui'),
subdir: '.',
reporters: [{ type: 'html' }, { type: 'text-summary' }],
check: {
global: {
statements: 75,
branches: 75,
functions: 75,
lines: 75,
},
},
},
reporters: ['progress', 'kjhtml'],
browsers: ['Chrome'],
restartOnFileChange: true,
});
};
1 change: 1 addition & 0 deletions modules/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"test": "ng test",
"test:coverage": "ng test --code-coverage",
"test-headless": "ng test --browsers=ChromeHeadless --watch=false",
"test-ci": "ng test --no-watch --no-progress --code-coverage --browsers=ChromeHeadless",
"docker": "docker rm -f test-run-ui && docker rmi test-run-ui && docker build -t test-run-ui . && docker run -d -p 80:80 --name test-run-ui test-run-ui",
"lint": "ng lint",
"lint:fix": "ng lint --fix",
Expand Down