forked from ipfs-inactive/js-ipfs-http-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.conf.js
89 lines (80 loc) · 2.02 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
const webpackConfig = require('./tasks/config').webpack
module.exports = function (config) {
const reporters = ['mocha']
// if (process.env.TRAVIS) {
// if (!process.env.SAUCE_USERNAME || !process.env.SAUCE_ACCESS_KEY) {
// console.log('Make sure the SAUCE_USERNAME and SAUCE_ACCESS_KEY environment variables are set.')
// process.exit(1)
// }
// reporters.push('saucelabs')
// }
// Browsers to run on Sauce Labs
// Check out https://saucelabs.com/platforms for all browser/OS combos
const customLaunchers = {
'SL_Chrome': {
base: 'SauceLabs',
platform: 'OS X 10.11',
browserName: 'chrome'
},
'SL_Firefox': {
base: 'SauceLabs',
platform: 'OS X 10.11',
browserName: 'firefox'
},
'SL_Safari': {
base: 'SauceLabs',
platform: 'OS X 10.11',
browserName: 'safari'
},
'SL_Edge': {
base: 'SauceLabs',
platform: 'Windows 10',
browserName: 'microsoftedge'
},
'SL_IE11': {
base: 'SauceLabs',
platform: 'Windows 10',
browserName: 'internet explorer',
version: '11.0'
}
}
config.set({
basePath: '',
frameworks: ['mocha'],
client: {
mocha: {
timeout: webpackConfig.dev.timeout
}
},
files: [
'test/setup.js',
'test/**/*.spec.js'
],
exclude: [],
preprocessors: {
'test/**/*.js': ['webpack']
},
webpack: webpackConfig.dev,
webpackMiddleware: {
noInfo: true
},
sauceLabs: {
testName: 'node-ipfs-api',
recordScreenshots: false,
connectOptions: {
port: 5757,
logfile: 'sauce_connect.log'
}
},
reporters: reporters,
port: 9876,
colors: true,
logLevel: process.env.DEBUG ? config.LOG_DEBUG : config.LOG_INFO,
autoWatch: false,
customLaunchers: customLaunchers,
browsers: process.env.TRAVIS ? ['Firefox'] /* Object.keys(customLaunchers)*/ : ['Chrome'],
singleRun: false,
concurrency: 2,
browserNoActivityTimeout: 600000
})
}