Skip to content

Commit

Permalink
fix: align Angular setup and improve tests (#313)
Browse files Browse the repository at this point in the history
* fix: align Angular setup and improve tests

* fix: update packge-lock.js

* fix: added deprecation plugin for linting

* fix: code cleanup

* fix: added shared module test

* fix: code cleanup ico format
  • Loading branch information
HenryT-CG authored Nov 25, 2024
1 parent 810534b commit 866716f
Show file tree
Hide file tree
Showing 18 changed files with 2,765 additions and 2,220 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ reports

# dependencies
node_modules
src

# profiling files
chrome-profiler-events*.json
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# onecx-theme-ui

OneCX Theme Mgmt UI
OneCX Theme
2 changes: 1 addition & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"budgets": [
{
"type": "initial",
"maximumWarning": "500kb",
"maximumWarning": "1mb",
"maximumError": "3mb"
},
{
Expand Down
48 changes: 17 additions & 31 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
// https://karma-runner.github.io/6.4/config/configuration-file.html

module.exports = function (config) {
config.set({
Expand All @@ -14,26 +14,26 @@ module.exports = function (config) {
require('karma-sonarqube-unit-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
port: 9876,
colors: true,
autoWatch: true,
singleRun: false,
restartOnFileChange: true,
browserConsoleLogOptions: { level: 'debug', format: '%b %T: %m', terminal: true },
// export CHROME_BIN=<path to binary>
browsers: ['Chrome'],
customLaunchers: {
Chrome: { base: 'ChromeHeadless', flags: ['--no-sandbox', '--disable-web-security'] }
},
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`
random: false
},
// https://jasmine.github.io/api/edge/Configuration.html
jasmine: { random: false },
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
reporters: ['progress', 'coverage', 'sonarqubeUnit'],
preprocessors: { 'src/**/*.js': ['coverage'] },
jasmineHtmlReporter: {
suppressAll: true // removes the duplicated traces
},
sonarqubeReporter: {
basePath: 'src/app', // test files folder
filePattern: '**/*.spec.ts', // test files glob pattern
encoding: 'utf-8', // test files encoding
outputFolder: 'sonar', // report destination
legacyMode: false, // report for Sonarqube < 6.2 (disabled)
reportName: 'sonarqube_report.xml'
suppressAll: true // remove duplicated traces
},
sonarQubeUnitReporter: {
sonarQubeVersion: 'LATEST',
Expand All @@ -47,20 +47,6 @@ module.exports = function (config) {
dir: 'reports',
subdir: 'coverage', // common name instaed browser-specific
reporters: [{ type: 'text-summary' }, { type: 'lcov' }]
},
reporters: ['progress', 'kjhtml', 'coverage', 'sonarqubeUnit'],
preprocessors: { 'src/**/*.js': ['coverage'] },
port: 9876,
colors: true,
autoWatch: true,
singleRun: false,
restartOnFileChange: true,
browsers: ['HeadlessChrome'],
customLaunchers: {
HeadlessChrome: {
base: 'ChromeHeadless',
flags: ['--no-sandbox']
}
}
})
}
Loading

0 comments on commit 866716f

Please sign in to comment.