-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.conf.js
93 lines (88 loc) · 2.75 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
82
83
84
85
86
87
88
89
90
91
92
93
module.exports = function (config) {
config.set({
frameworks: ['browserify','jasmine'],
plugins: [
'karma-browserify',
'karma-chrome-launcher',
'karma-firefox-launcher',
'karma-jasmine',
'karma-coverage',
],
files:[
'node_modules/jquery/dist/jquery.js',
'node_modules/sd-utils/dist/sd-utils.js',
'node_modules/sd-model/dist/sd-model.js',
'dist/sd-tree-designer-vendor.js',
'src/**/*.js',
'test/**/*.js',
// JSON fixture
{ pattern: 'test/data-json-filelist.json',
watched: true,
served: true,
included: false },
{ pattern: 'test/data/*.json',
watched: true,
served: true,
included: false },
{ pattern: 'test/trees/*.json',
watched: true,
served: true,
included: false }
],
preprocessors: {
'src/**/*.js': ['browserify'],
'test/**/*.js': ['browserify']
},
browserify: {
debug: true,
"transform": [
["stringify", {
appliesTo: { includeExtensions: ['.html'] }
}],
[
"babelify",
{
"presets": [
"@babel/preset-env"
],
"plugins": [
"transform-class-properties",
"transform-object-assign",
"@babel/plugin-proposal-object-rest-spread",
[
"babel-plugin-transform-builtin-extend",
{
"globals": [
"Error"
]
}
],
"istanbul"
]
},
]
]
},
// start these browsers
browsers: ['Chrome'],
reporters: ['progress', 'coverage'],
logLevel: config.LOG_WARN,
singleRun: false,
browserConsoleLogOptions: {
terminal: true,
level: ""
},
coverageReporter: {
reporters: [
// {'type': 'text'},
{'type': 'html', dir: 'coverage'},
{'type': 'lcov'}
]
},
client: {
jasmine: {
random: false
}
}
});
};