Skip to content

Commit c12dfd9

Browse files
committed
Fix gitlab-ci
1 parent a2f5129 commit c12dfd9

File tree

2 files changed

+37
-6
lines changed

2 files changed

+37
-6
lines changed

frontend-angular/karma.conf.js

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,49 @@
11
module.exports = function (config) {
22
config.set({
3-
// ... autres configs
4-
browsers: ['Chrome', 'ChromeHeadless'],
3+
basePath: '',
4+
frameworks: ['jasmine', '@angular-devkit/build-angular'],
5+
plugins: [
6+
require('karma-jasmine'),
7+
require('karma-chrome-launcher'),
8+
require('karma-jasmine-html-reporter'),
9+
require('karma-coverage'),
10+
require('@angular-devkit/build-angular/plugins/karma')
11+
],
12+
client: {
13+
jasmine: {
14+
// you can add configuration options for Jasmine here
15+
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
16+
// for example, you can disable the random execution order
17+
random: true
18+
},
19+
clearContext: false // leave Jasmine Spec Runner output visible in browser
20+
},
21+
jasmineHtmlReporter: {
22+
suppressAll: true // removes the duplicated traces
23+
},
24+
coverageReporter: {
25+
dir: require('path').join(__dirname, './coverage/angular-starter'),
26+
subdir: '.',
27+
reporters: [
28+
{ type: 'html' },
29+
{ type: 'text-summary' }
30+
]
31+
},
32+
reporters: ['progress', 'kjhtml'],
33+
browsers: ['Chrome'],
534
customLaunchers: {
635
ChromeHeadless: {
736
base: 'Chrome',
837
flags: [
938
'--headless',
1039
'--disable-gpu',
1140
'--no-sandbox',
12-
'--disable-dev-shm-usage'
41+
'--disable-dev-shm-usage',
42+
'--disable-web-security',
43+
'--remote-debugging-port=9222'
1344
]
1445
}
15-
}
46+
},
47+
restartOnFileChange: true
1648
});
1749
};

frontend-angular/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"build": "ng build",
99
"watch": "ng build --watch --configuration development",
1010
"test": "ng test",
11-
"test:headless2": "ng test --watch=false --browsers=ChromeHeadless --no-sandbox",
1211
"test:headless": "ng test --watch=false --browsers=ChromeHeadless",
1312
"coverage": "ng test --no-watch --code-coverage",
1413
"lint": "ng lint",
@@ -54,4 +53,4 @@
5453
"typescript": "5.8.3",
5554
"typescript-eslint": "8.43.0"
5655
}
57-
}
56+
}

0 commit comments

Comments
 (0)