-
Notifications
You must be signed in to change notification settings - Fork 3
/
karma.conf.js
142 lines (142 loc) · 5.4 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
function cfg(config) {
config.set({
basePath: '',
frameworks: ['jasmine'],
plugins: [
'karma-jasmine',
'karma-coverage',
'karma-ie-launcher',
'karma-chrome-launcher',
'karma-firefox-launcher',
],
files: [
'./src/references/*.js',
'./src/utils/utilsglobal.js',
'./src/ui/dom/domglobal.js',
'./src/register/*.js',
'./src/dependency/injector/*.js',
'./src/acquire/*.js',
'./src/debug/*.js',
'./src/compat/*.js',
'./src/utils/utils.js',
'./src/window/window.js',
'./src/document/document.js',
'./src/expressions/regex/*.js',
'./src/web/location/*.js',
'./src/web/browser/*.js',
'./src/web/urlutils/*.js',
'./src/async/promise.js',
'./src/async/ajax.js',
'./src/storage/cache/cache.js',
'./src/storage/cache/templatecache.js',
'./src/storage/basestorage.js',
'./src/storage/localstorage.js',
'./src/storage/sessionstorage.js',
'./src/expressions/operators/operators.js',
'./src/expressions/tokenizer/tokenizer.js',
'./src/expressions/parser/parser.js',
'./src/observable/contextmanager/contextmanager.js',
'./src/events/dispatchevent.js',
'./src/events/lifecycleevent.js',
'./src/events/eventmanager.js',
'./src/events/errorevent.js',
'./src/control/control.js',
'./src/attributecontrol/attributecontrol.js',
'./src/ui/templatecontrol/templatecontrol.js',
'./src/ui/viewcontrol/viewcontrol.js',
'./src/ui/dom/dom.js',
'./src/ui/bindabletemplates/bindabletemplates.js',
'./src/ui/attributes/attributes.js',
'./src/ui/resources/resources.js',
'./src/ui/domevents/domevents.js',
'./src/processing/compiler/compiler.js',
'./src/processing/nodemanager/nodemanager.js',
'./src/processing/nodemanager/elementmanager.js',
'./src/processing/nodemanager/textmanager.js',
'./src/processing/nodemanager/commentmanager.js',
'./src/processing/nodemanager/attributemanager.js',
'./src/routing/history/history.js',
'./src/routing/navigator/navigator.js',
'./src/routing/segments/segments.js',
'./src/routing/state/state.js',
'./src/routing/routerecognizer/routerecognizer.js',
'./src/routing/router/router.js',
'./src/controls/name/namecontrol.js',
'./src/controls/simpleevent/simpleevent.js',
'./src/controls/keycodeevent/keycodeevent.js',
'./src/controls/setattributecontrol/setattributecontrol.js',
'./src/controls/elementpropertycontrol/elementpropertycontrol.js',
'./src/controls/bind/bind.js',
'./src/controls/observableattributecontrol/observableattributecontrol.js',
'./src/ui/bindcontrol/bindcontrol.js',
'./src/ui/controls/viewport/viewport.js',
'./src/ui/controls/template/template.js',
'./src/ui/controls/ignore/ignore.js',
'./src/ui/controls/foreach/foreach.js',
'./src/ui/controls/html/html.js',
'./src/ui/controls/select/select.js',
'./src/ui/controls/if/if.js',
'./src/app/app.js',
'./test/unit/**/*.js'
],
exclude: [
'**/*node_modules*'
],
preprocessors: {
'./src/**/*.js': 'coverage'
},
// web server port
// CLI --port 9876
port: 9876,
// cli runner port
// CLI --runner-port 9100
runnerPort: 9100,
// enable / disable colors in the output (reporters and logs)
// CLI --colors --no-colors
colors: true,
// enable / disable watching file and executing tests whenever any file changes
// CLI --auto-watch --no-auto-watch
autoWatch: true,
// Start these browsers, currently available:
// - Chrome
// - ChromeCanary
// - Firefox
// - Opera
// - Safari (only Mac)
// - PhantomJS
// - IE (only Windows)
// CLI --browsers Chrome,Firefox,Safari
browsers: ['Chrome'],
customLaunchers: {
IE11: {
base: 'IE',
flags: ['-private']
},
IE10: {
base: 'IE',
'x-ua-compatible': 'IE=EmulateIE10',
flags: ['-private']
},
IE9: {
base: 'IE',
'x-ua-compatible': 'IE=EmulateIE9',
flags: ['-private']
}
},
// If browser does not capture in given timeout [ms], kill it
// CLI --capture-timeout 5000
captureTimeout: 5000,
// Auto run tests on start (when browsers are captured) and exit
// CLI --single-run --no-single-run
singleRun: true,
// report which specs are slower than 500ms
// CLI --report-slower-than 500
reportSlowerThan: 500,
reporters: ['progress', 'coverage'],
coverageReporter: {
type: 'html',
dir: 'test/coverage/'
}
});
}
module.exports = cfg;