-
Notifications
You must be signed in to change notification settings - Fork 81
/
Copy pathkarma.ci.conf.js
85 lines (83 loc) · 2.33 KB
/
karma.ci.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
82
83
84
85
const getSpecs = (listSpec) => {
if (listSpec) {
return listSpec.split(',');
}
return ['components/**/*.spec.js'];
};
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine'],
files: [
'dist/css/light-theme.css',
'dist/js/jquery-3.1.1.js',
'node_modules/jasmine-jquery/lib/jasmine-jquery.js',
'dist/js/d3.v4.js',
'dist/js/sohoxi.js',
'dist/js/cultures/en-US.js'
].concat(getSpecs(process.env.KARMA_SPECS)),
exclude: [
'node_modules'
],
preprocessors: {
'components/**/*.spec.js': ['webpack', 'sourcemap'],
'dist/js/sohoxi.js': ['coverage']
},
webpack: {
module: {
rules: [
{
test: /\.html$/,
use: [{
loader: 'html-loader'
}],
},
{
test: /\.js$/,
use: [{
loader: 'babel-loader',
options: {
presets: ['env']
}
}],
exclude: /node_modules/
}
]
}
},
webpackMiddleware: {
stats: 'errors-only'
},
reporters: ['mocha', 'coverage', 'junit'],
coverageReporter: {
includeAllSources: true,
dir: 'coverage/',
reporters: [
{ type: 'html', subdir: 'html' },
{ type: 'text-summary' }
]
},
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
browsers: ['ChromeHeadlessNoSandbox'],
customLaunchers: {
ChromeHeadlessNoSandbox: {
base: 'ChromeHeadless',
flags: ['--no-sandbox']
}
},
autoWatch: false,
singleRun: true,
concurrency: Infinity,
junitReporter: {
outputDir: 'test-reports', // results will be saved as $outputDir/$browserName.xml
outputFile: 'junit-report.xml', // if included, results will be saved as $outputDir/$browserName/$outputFile
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
classNameFormatter: undefined, // function (browser, result) to customize the classname
properties: {} // key value pair of properties to add to the section of the report
}
});
};