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

Commit b6cbb2d

Browse files
committed
test: karma config for ChromeHeadless
1 parent 6988aa7 commit b6cbb2d

File tree

4 files changed

+37
-4
lines changed

4 files changed

+37
-4
lines changed

.github/workflows/daily-project-check.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
matrix:
1515
node-version: [14.x]
16-
os: [ubuntu-latest, windows-latest, macOS-latest]
16+
os: [ubuntu-latest]
1717

1818
steps:
1919
- uses: actions/checkout@v1
@@ -25,7 +25,7 @@ jobs:
2525
run: |
2626
npm i
2727
npm run build
28-
npm run test
28+
npm run test:github
2929
npm run lint
3030
env:
3131
CI: true

.github/workflows/project-check.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
run: |
2929
npm i
3030
npm run build
31-
npm run test
31+
npm run test:github
3232
npm run lint
3333
env:
3434
CI: true

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
"ng": "ng",
2828
"start": "ng serve",
2929
"build": "ng build",
30-
"test": "ng test --watch=false",
30+
"test": "ng test",
31+
"test:github": "ng test --karma-config=projects/coreui/icons-angular/karma.conf.github.js",
3132
"lint": "ng lint",
3233
"link-lib": "cd dist/coreui-icons-angular/ && npm link",
3334
"publish-lib": "cd dist/coreui-icons-angular/ && npm publish --tag next --dry-run",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// Karma configuration file, see link for more information
2+
// https://karma-runner.github.io/1.0/config/configuration-file.html
3+
4+
module.exports = function (config) {
5+
config.set({
6+
basePath: '',
7+
frameworks: ['jasmine', '@angular-devkit/build-angular'],
8+
plugins: [
9+
require('karma-jasmine'),
10+
require('karma-chrome-launcher'),
11+
require('karma-jasmine-html-reporter'),
12+
require('karma-coverage-istanbul-reporter'),
13+
require('@angular-devkit/build-angular/plugins/karma')
14+
],
15+
client: {
16+
clearContext: false // leave Jasmine Spec Runner output visible in browser
17+
},
18+
coverageIstanbulReporter: {
19+
dir: require('path').join(__dirname, '../../../coverage/coreui/icons-angular'),
20+
reports: ['html', 'lcovonly', 'text-summary'],
21+
fixWebpackSourcePaths: true
22+
},
23+
reporters: ['progress', 'kjhtml'],
24+
port: 9876,
25+
colors: true,
26+
logLevel: config.LOG_INFO,
27+
autoWatch: false,
28+
singleRun: true,
29+
restartOnFileChange: false,
30+
browsers: ['ChromeHeadless'],
31+
});
32+
};

0 commit comments

Comments
 (0)