forked from mulesoft-labs/js-client-oauth2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
125 lines (112 loc) · 2.38 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
var isTravis = require('is-travis')
/**
* Initialize Karma with config information.
*
* @param {Object} config
*/
module.exports = function (config) {
config.set({
/**
* The base path used to resolve files.
*
* @type {String}
*/
basePath: __dirname,
/**
* Test frameworks to use.
*
* @type {Array}
*/
frameworks: ['mocha', 'sinon-chai'],
/**
* Preprocess files matching a given pattern.
*
* @type {Object}
*/
preprocessors: {
'client-oauth2.js': ['coverage']
},
/**
* List of files and patterns to load in the browser.
*
* @type {Array}
*/
files: [
'node_modules/es6-promise/dist/es6-promise.js',
'test/support/globals.js',
'node_modules/popsicle/popsicle.js',
'client-oauth2.js',
'test/*.js'
],
/**
* List of files and patterns to exclude in the browser.
*
* @type {Array}
*/
exclude: [],
/**
* Test results reporter to use.
* Possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
*
* @type {Array}
*/
reporters: ['progress', 'coverage'],
/**
* Web server port number.
*
* @type {Number}
*/
port: 9876,
/**
* Enable or disable colors in the output (reporters and logs).
*
* @type {Boolean}
*/
colors: true,
/**
* Level of logging.
* Possible values:
* - config.LOG_DISABLE
* - config.LOG_ERROR
* - config.LOG_WARN
* - config.LOG_INFO
* - config.LOG_DEBUG
*
* @type {Number}
*/
logLevel: config.LOG_INFO,
/**
* Enable and disable file watching and execution of tests when a
* file changes.
*
* @type {Boolean}
*/
autoWatch: true,
/**
* Start these browsers automatically:
* - Chrome
* - ChromeCanary
* - Firefox
* - Opera
* - Safari (Mac)
* - PhantomJS
* - IE (Windows)
*
* @type {Array}
*/
browsers: isTravis ? ['PhantomJS'] : ['Chrome', 'Firefox', 'PhantomJS'],
/**
* If a browser does not capture within a given timeout, kill it.
*
* @type {Number}
*/
captureTimeout: 60000,
/**
* Continuous Integration mode. If true, it will capture browsers, run
* tests and exit.
*
* @type {Boolean}
*/
singleRun: true
})
}