forked from wheresrhys/fetch-mock
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
44 lines (38 loc) · 914 Bytes
/
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
'use strict';
module.exports = function(karma) {
var configuration = {
frameworks: [ 'mocha', 'chai', 'browserify'],
files: [
'http://cdn.polyfill.io/v2/polyfill.min.js?features=default,Promise,fetch,Array.prototype.map,Array.prototype.filter',
'test/client.js',
'test/sw.js',
{pattern: 'test/fixtures/built-sw.js', served: true, included: false},
],
proxies: {
'/__sw.js': '/base/test/fixtures/built-sw.js'
},
preprocessors: {
'test/*.js': ['browserify']
},
browserify: {
debug: true,
transform: [
['babelify', {
'presets': ['es2015'],
'plugins': ['transform-object-assign']
}]
]
},
browsers: ['Chrome'],
customLaunchers: {
Chrome_travis_ci: {
base: 'Chrome',
flags: ['--no-sandbox']
}
}
};
if(process.env.TRAVIS){
configuration.browsers = ['PhantomJS', 'Firefox', 'Chrome_travis_ci'];
}
karma.set(configuration);
};