-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathkarma.conf.js
More file actions
92 lines (83 loc) · 2.18 KB
/
karma.conf.js
File metadata and controls
92 lines (83 loc) · 2.18 KB
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
module.exports = function (config) {
'use strict';
config.set({
basePath: '',
frameworks: [
'qunit',
'requirejs'
],
files: [
'test/polyfills/promise-6.0.0.min.js',
'test/polyfills/promise-done-5.0.0.js',
'bower_components/jquery/dist/jquery.js',
'test/fix.testRunner.js',
'node_modules/sinon/pkg/sinon-1.12.2.js',
'node_modules/sinon/pkg/sinon-ie-1.12.2.js',
'test/lib/sinon-qunit.js',
'test/karma.main.js', {
pattern: 'src/{,*/}*.js',
included: false
}, {
pattern: 'src/utils/{,*/}*.js',
included: false
}, {
pattern: 'test/testSuite.js',
included: false
}, {
pattern: 'define.amd.js',
included: false
}, {
pattern: 'test/spec/{,*/}*.js',
included: false
}
],
exclude: [
'src/*.promise.js'
],
// use dots reporter, as travis terminal does not support escaping sequences
// possible values: 'dots', 'progress', 'junit', 'teamcity'
// CLI --reporters progress
reporters: ['progress'],//'coverage'
preprocessors: {
'src/{,*/}*.js': 'coverage'
},
coverageReporter: {
type: 'lcov',
dir: 'coverage/'
},
// enable / disable watching file and executing tests whenever any file changes
// CLI --auto-watch --no-auto-watch
autoWatch: true,
// start these browsers
// CLI --browsers Chrome,Firefox,Safari
browsers: [
'PhantomJS',
'Firefox',
'Chrome',
'ChromeCanary',
'Safari'
],
customLaunchers: {
ChromeExperimental: {
base: 'Chrome',
flags: ['--enable-javascript-harmony']
}
},
// if browser does not capture in given timeout [ms], kill it
// CLI --capture-timeout 5000
captureTimeout: 20000,
// auto run tests on start (when browsers are captured) and exit
// CLI --single-run --no-single-run
singleRun: true,
plugins: [
'karma-qunit',
'karma-sinon',
'karma-requirejs',
'karma-coverage',
'karma-phantomjs-launcher',
'karma-firefox-launcher',
'karma-chrome-launcher',
'karma-safari-launcher'
]
});
};