-
Notifications
You must be signed in to change notification settings - Fork 80
/
karma.local.conf.js
70 lines (68 loc) · 1.95 KB
/
karma.local.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
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']
},
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', 'junit'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
browsers: ['Chrome'],
autoWatch: true,
singleRun: false,
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
}
});
};