forked from openannotation/annotator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
98 lines (85 loc) · 2.87 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
module.exports = function (karma) {
karma.set({
frameworks: ["mocha", "browserify"],
files: [
// Fixtures
{pattern: 'test/fixtures/*.html', included: false},
// IE-specific shims
{pattern: 'node_modules/wgxpath/wgxpath.install.js', watched: false},
// Test harness
{pattern: 'node_modules/sinon/pkg/sinon.js', watched: false},
{pattern: 'node_modules/sinon/pkg/sinon-ie.js', watched: false},
'test/init.js',
// Test suites
'test/spec/**/*_spec.js'
],
preprocessors: {
'node_modules/wgxpath/wgxpath.install.js': 'browserify',
'test/**/*.js': 'browserify'
},
browserify: {
debug: true,
configure: function (bundle) {
bundle.require('.', {expose: 'annotator'});
}
},
browsers: ['PhantomJS'],
reporters: ['dots'],
customLaunchers: {
'SL_Chrome': {
base: 'SauceLabs',
browserName: 'chrome',
version: '41'
},
'SL_Firefox': {
base: 'SauceLabs',
browserName: 'firefox',
version: '36'
},
'SL_Safari': {
base: 'SauceLabs',
browserName: 'safari',
platform: 'OS X 10.10',
version: '8'
},
'SL_IE_8': {
base: 'SauceLabs',
browserName: 'internet explorer',
platform: 'Windows 7',
version: '8'
},
'SL_IE_9': {
base: 'SauceLabs',
browserName: 'internet explorer',
platform: 'Windows 7',
version: '9'
},
'SL_IE_10': {
base: 'SauceLabs',
browserName: 'internet explorer',
platform: 'Windows 8',
version: '10'
},
'SL_IE_11': {
base: 'SauceLabs',
browserName: 'internet explorer',
platform: 'Windows 8.1',
version: '11'
}
}
});
if (process.env.TRAVIS) {
var buildLabel = 'TRAVIS #' + process.env.TRAVIS_BUILD_NUMBER + ' (' + process.env.TRAVIS_BUILD_ID + ')';
karma.sauceLabs = {
build: buildLabel,
startConnect: false,
testName: 'Annotator',
tunnelIdentifier: process.env.TRAVIS_JOB_NUMBER
};
// Travis/Sauce runs frequently time out before data starts coming back
// from Sauce. This ups the timeout from 10 to 30 seconds.
karma.browserNoActivityTimeout = 30 * 1000;
karma.browsers = [process.env.BROWSER];
karma.reporters = ['dots', 'saucelabs'];
}
};