forked from positive-js/mosaic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
62 lines (53 loc) · 2.11 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
const { join } = require('path');
const { constants } = require('karma');
module.exports = () => {
return {
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-coverage'),
require('karma-junit-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
clearContext: false, // leave Jasmine Spec Runner output visible in browser
jasmine: {
random: false
}
},
angularCli: {
sourceMap: true
},
reporters: ['dots', 'junit'],
files: [
{ pattern: '../../dist/mosaic/prebuilt-themes/default-theme.css', included: true, watched: true },
],
port: 9876,
colors: true,
logLevel: constants.LOG_INFO,
autoWatch: false,
singleRun: true,
junitReporter: {
outputDir: process.env.JUNIT_REPORT_PATH || join(__dirname, './dist/reports/junit'),
outputFile: process.env.JUNIT_REPORT_NAME || join(__dirname, './dist/reports/junit/test-results.xml'),
suite: '', // suite will become the package name attribute in xml testsuite element
useBrowserName: true, // add browser name to report and classes names
nameFormatter: undefined, // function (browser, result) to customize the name attribute in xml testcase element
classNameFormatter: undefined, // function (browser, result) to customize the classname attribute in xml testcase element
properties: {} // key value pair of properties to add to the <properties> section of the report
},
customLaunchers: {
'ChromeHeadlessLocal': {
'base': 'ChromeHeadless',
'flags': [
'--window-size=1024,768',
'--no-sandbox'
],
'debug': true
}
},
browsers: ['ChromeHeadlessLocal']
};
};