forked from jquense/react-widgets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf-ci.js
101 lines (84 loc) · 2.07 KB
/
karma.conf-ci.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
'use strict';
//var fs = require('fs');
module.exports = function(config) {
// Use ENV vars on Travis and sauce.json locally to get credentials
if (!process.env.SAUCE_USERNAME) {
throw new Error('Missing Username and Access Key env variables')
}
// Browsers to run on Sauce Labs
var customLaunchers = {
SL_ie_8: {
base: 'SauceLabs',
browserName: 'internet explorer',
platform: 'Windows XP',
version: '8'
},
// SL_ie_9: {
// base: 'SauceLabs',
// browserName: 'internet explorer',
// platform: 'Windows 7',
// version: '9'
// },
// SL_ie_10: {
// base: 'SauceLabs',
// browserName: 'internet explorer',
// version: '10'
// },
// SL_chrome: {
// base: 'SauceLabs',
// browserName: 'chrome'
// },
// SL_firefox: {
// base: 'SauceLabs',
// browserName: 'firefox'
// },
// sl_ios_safari: {
// base: 'SauceLabs',
// browserName: 'iphone',
// platform: 'OS X 10.9',
// version: '7.1'
// },
};
config.set({
basePath: '',
frameworks: ['mocha', 'expect'],
files: [
'./vendor/es5-shim.min.js',
'./vendor/es5-sham.min.js',
'./vendor/html5shiv.min.js',
'./vendor/phantomjs-shim.js',
'./vendor/sinon-1.10.3.js',
'./vendor/jquery-1.11.2.min.js',
'_test-bootstrap.js'
],
reporters: ['mocha','saucelabs'],
port: 9876,
colors: true,
sauceLabs: {
testName: 'Karma and Sauce Labs demo'
},
captureTimeout: 120000,
customLaunchers: customLaunchers,
browsers: Object.keys(customLaunchers),
logLevel: config.LOG_INFO,
preprocessors: {
'_test-bootstrap.js': ['webpack']
},
webpack: require('./build/test.config'),
webpackServer: {
noInfo: true
},
client: {
mocha: {
timeout: 4000
}
},
plugins: [
require("karma-mocha-reporter"),
require("karma-sauce-launcher"),
require("karma-webpack"),
require("karma-mocha"),
require("karma-expect"),
]
});
};