Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
ci: re-add karma config to run once in headless mode
  • Loading branch information
timdeschryver committed Jul 26, 2023
commit 3a473aeaf780b4cec24c5a905bacac46e3e89d4d
38 changes: 38 additions & 0 deletions apps/example-app-karma/karma.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
try {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
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
},
reporters: ['progress'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['ChromeHeadless'],
singleRun: true,
restartOnFileChange: true,
});
} catch (err) {
console.log(err);
throw err;
}
};
9 changes: 2 additions & 7 deletions apps/example-app-karma/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@
"maximumWarning": "6kb"
}
],
"fileReplacements": [
{
"replace": "apps/example-app-karma/src/environments/environment.ts",
"with": "apps/example-app-karma/src/environments/environment.prod.ts"
}
],
"outputHashing": "all"
},
"development": {
Expand Down Expand Up @@ -72,7 +66,8 @@
"executor": "@angular-devkit/build-angular:karma",
"options": {
"main": "apps/example-app-karma/src/test.ts",
"tsConfig": "apps/example-app-karma/tsconfig.spec.json"
"tsConfig": "apps/example-app-karma/tsconfig.spec.json",
"karmaConfig": "apps/example-app-karma/karma.conf.js"
}
}
},
Expand Down
6 changes: 0 additions & 6 deletions apps/example-app/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@
"maximumWarning": "6kb"
}
],
"fileReplacements": [
{
"replace": "apps/example-app/src/environments/environment.ts",
"with": "apps/example-app/src/environments/environment.prod.ts"
}
],
"outputHashing": "all"
},
"development": {
Expand Down