Skip to content
This repository has been archived by the owner on Jul 13, 2022. It is now read-only.

Commit

Permalink
test: karma config for ChromeHeadless
Browse files Browse the repository at this point in the history
  • Loading branch information
xidedix committed Jan 9, 2021
1 parent 6988aa7 commit b6cbb2d
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/daily-project-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
node-version: [14.x]
os: [ubuntu-latest, windows-latest, macOS-latest]
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v1
Expand All @@ -25,7 +25,7 @@ jobs:
run: |
npm i
npm run build
npm run test
npm run test:github
npm run lint
env:
CI: true
2 changes: 1 addition & 1 deletion .github/workflows/project-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
run: |
npm i
npm run build
npm run test
npm run test:github
npm run lint
env:
CI: true
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test --watch=false",
"test": "ng test",
"test:github": "ng test --karma-config=projects/coreui/icons-angular/karma.conf.github.js",
"lint": "ng lint",
"link-lib": "cd dist/coreui-icons-angular/ && npm link",
"publish-lib": "cd dist/coreui-icons-angular/ && npm publish --tag next --dry-run",
Expand Down
32 changes: 32 additions & 0 deletions projects/coreui/icons-angular/karma.conf.github.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// 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-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/coreui/icons-angular'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: false,
singleRun: true,
restartOnFileChange: false,
browsers: ['ChromeHeadless'],
});
};

0 comments on commit b6cbb2d

Please sign in to comment.