-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathkarma.conf.js
81 lines (79 loc) · 2.48 KB
/
karma.conf.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
const OUTPUT = process.env.COMPACT_TEST_RESULTS ? 'minimal' : 'full';
module.exports = function (config) {
config.set({
frameworks: ['jasmine', '@angular-devkit/build-angular', 'viewport'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-mocha-reporter'),
require('karma-coverage'),
require('karma-junit-reporter'),
require('karma-viewport'),
require('@angular-devkit/build-angular/plugins/karma'),
],
client: {
clearContext: false, // leave Jasmine Spec Runner output visible in browser
},
coverageReporter: {
subdir: '.',
reporters: ['html', 'lcovonly'],
fixWebpackSourcePaths: true,
},
angularCli: {
environment: 'dev',
},
reporters: ['junit', 'mocha'],
mochaReporter: {
ignoreSkipped: true,
output: OUTPUT,
},
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome_Headless'],
browserDisconnectTimeout: 25000,
browserNoActivityTimeout: 50000,
singleRun: false,
customLaunchers: {
// provide --no-sandbox to let it run on the virtual machine
Chrome_Headless: {
base: 'Chrome',
flags: ['--headless', '--no-sandbox', '--disable-gpu', '--window-size=1184,900', '--remote-debugging-port=9222'],
},
Chrome_with_debugging: {
base: 'Chrome',
flags: ['--remote-debugging-port=9222'],
debug: true,
},
},
// Viewport configuration
viewport: {
breakpoints: [
{
name: 'mobile',
size: {
width: 320,
height: 480,
},
},
{
name: 'tablet',
size: {
width: 704,
height: 1024,
},
},
{
name: 'desktop',
size: {
width: 1184,
height: 900,
},
},
],
},
});
return config;
};