-
Notifications
You must be signed in to change notification settings - Fork 1
/
karma.conf.js
106 lines (83 loc) · 2.82 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
/*jshint undef:false */
// Karma configuration
module.exports = function(config) {
var junitReporterOutputFile = (config.testModule || 'default') + '.xml';
config.set({
// Base path that will be used to resolve files and exclude.
basePath : '',
// Testing framework to be used, default is `jasmine`.
frameworks : [
'qunit'
],
// Test results reporter to use.
// Possible values: 'dots', 'progress', 'junit'
reporters: ['progress', 'junit'],
// the default configuration
junitReporter: {
outputDir: 'build-result', // results will be saved as $outputDir/$browserName.xml
outputFile: junitReporterOutputFile, // if included, results will be saved as $outputDir/$browserName/$outputFile
suite: '', // suite will become the package name attribute in xml testsuite element
useBrowserName: false // add browser name to report and classes names
},
// Web server port.
port : 9876,
// Cli runner port.
runnerPort : 9100,
// Enable / disable colors in the output (reporters and logs).
colors : true,
// Level of logging. Possible values are:
//
// * LOG_DISABLE
// * LOG_ERROR
// * LOG_WARN
// * LOG_INFO
// * LOG_DEBUG
logLevel : config.LOG_INFO,
// Enable / disable watching files and executing tests whenever any of them
// changes.
autoWatch : false,
// Start these browsers, currently available:
// - Chrome
// - ChromeCanary
// - Firefox
// - Opera
// - Safari (only Mac)
// - PhantomJS
// - IE (only Windows)
browsers : ['Chrome'],
// If the browser does not capture in the given timeout [ms], then kill it.
captureTimeout : 120000,
// How long does Karma wait for a message from a browser before disconnecting it (in ms).
browserNoActivityTimeout: 120000,
// Continuous Integration mode.
// If it's `true`, then it captures browsers, runs the tests and exits.
singleRun : true,
customLaunchers: {
PhantomJSDebug : {
base: 'PhantomJS',
options: {
windowName: 'my-window',
settings: {
webSecurityEnabled: false
},
},
flags: ['--load-images=true'],
debug: true
},
PhantomJSFixedViewport: {
base: 'PhantomJS',
options: {
viewportSize: {
width: 1280,
height: 720
},
onCallback: function(data){
if (data.type === 'render' && typeof data.fname === 'string') {
page.render(data.fname);
}
}
}
}
}
});
};