forked from slab/quill
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.js
95 lines (83 loc) · 2.61 KB
/
karma.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
var _ = require('lodash');
var os = require('os');
var CHROME_VERSION = '34'
var FIREFOX_VERSION = '28'
var SAFARI_VERSION = '7'
var IOS_VERSION = '7.1'
var ANDROID_VERSION = '4.3'
var browsers = {
'mac-chrome' : ['Mac 10.9', 'chrome', CHROME_VERSION],
'mac-firefox' : ['Mac 10.9', 'firefox', FIREFOX_VERSION],
'mac-safari' : ['Mac 10.9', 'safari', SAFARI_VERSION],
'windows-chrome' : ['Windows 8.1', 'chrome', CHROME_VERSION],
'windows-firefox' : ['Windows 8.1', 'firefox', FIREFOX_VERSION],
'windows-ie-11' : ['Windows 8.1', 'internet explorer', '11'],
'windows-ie-10' : ['Windows 7', 'internet explorer', '10'],
'windows-ie-9' : ['Windows 7', 'internet explorer', '9'],
'linux-chrome' : ['Linux', 'chrome', CHROME_VERSION],
'linux-firefox' : ['Linux', 'firefox', FIREFOX_VERSION],
'iphone' : ['Mac 10.9', 'iphone', IOS_VERSION],
'ipad' : ['Mac 10.9', 'ipad', IOS_VERSION],
'android' : ['Linux', 'android', ANDROID_VERSION]
}
var customLaunchers = _.reduce(browsers, function(memo, browser, name) {
memo[name] = {
base: 'SauceLabs',
platform: browser[0],
browserName: browser[1],
version: browser[2]
};
return memo;
}, {});
module.exports = function(config) {
config.set({
basePath: '../build',
frameworks: ['jasmine'],
files: [
'../node_modules/jquery/dist/jquery.js',
'../node_modules/lodash/lodash.js',
'../node_modules/async/lib/async.js',
'tandem-core.js',
'quill.exposed.js',
'test/fixtures/unit.html',
'test/helpers/*.js',
'test/unit/*.js',
'test/unit/lib/*.js',
'test/unit/modules/*.js',
'test/unit/themes/*.js'
],
exclude: [],
coverageReporter: {
type: 'lcov',
dir: '../coverage/'
},
reporters: ['progress'],
preprocessors: {
'**/*.html': ['html2js']
},
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: false,
singleRun: true,
sauceLabs: {
testName: 'Quill',
username: 'quill',
accessKey: 'adc0c0cf-221b-46f1-81b9-a4429b722c2e',
build: os.hostname() + '-' + _.random(16*16*16*16).toString(16),
options: {
'public': 'public',
'record-screenshots': false
}
},
customLaunchers: customLaunchers
})
if (process.env.TRAVIS) {
config.transports = ['xhr-polling'];
config.sauceLabs.build = 'travis-' + process.env.TRAVIS_BUILD_ID;
if (process.env.TRAVIS_BRANCH == 'master' && !process.env.TRAVIS_PULL_REQUEST) {
config.sauceLabs.username = 'quill-master';
config.sauceLabs.accessKey = '685c8996-7b70-4543-8167-58f8e88a8484';
}
}
}