Skip to content

Commit

Permalink
refactor(app-config): improve type-safety of parsed configuration (#1074
Browse files Browse the repository at this point in the history
)
  • Loading branch information
subotic committed Jun 5, 2023
1 parent 70d8bdc commit 01662fd
Show file tree
Hide file tree
Showing 13 changed files with 409 additions and 377 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Expand Up @@ -91,7 +91,8 @@ jobs:
dsp-app-tests,
dateadapter-tests,
jdnconvertiblecalendar-tests,
jdnconvertiblecalendardateadapter-tests
jdnconvertiblecalendardateadapter-tests,
vre-shared-app-config-tests
]
runs-on: ubuntu-latest
if: github.ref_name == 'main' || startsWith(github.ref, 'refs/tags')
Expand Down
52 changes: 26 additions & 26 deletions apps/dateAdapter/karma.conf.js
Expand Up @@ -2,30 +2,30 @@
// 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-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma'),
],
client: {
clearContext: false, // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, '../coverage'),
reports: ['html', 'lcovonly'],
fixWebpackSourcePaths: true,
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
});
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-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma'),
],
client: {
clearContext: false, // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, '../coverage'),
reports: ['html', 'lcovonly'],
fixWebpackSourcePaths: true,
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
});
};
2 changes: 1 addition & 1 deletion apps/dsp-app/src/main.ts
Expand Up @@ -11,7 +11,7 @@ function configListener() {

// pass config to bootstrap process using an injection token
// which will make the encapsulated value available inside
// services tha inject this token
// services that inject this token
platformBrowserDynamic([
{ provide: AppConfigToken, useValue: configuration },
])
Expand Down
52 changes: 26 additions & 26 deletions libs/jdnconvertiblecalendardateadapter/karma.conf.js
Expand Up @@ -2,30 +2,30 @@
// 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-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma'),
],
client: {
clearContext: false, // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, '../../coverage'),
reports: ['html', 'lcovonly'],
fixWebpackSourcePaths: true,
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
});
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-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma'),
],
client: {
clearContext: false, // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, '../../coverage'),
reports: ['html', 'lcovonly'],
fixWebpackSourcePaths: true,
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
});
};

0 comments on commit 01662fd

Please sign in to comment.