-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathkarma.conf.ts
71 lines (67 loc) · 1.67 KB
/
karma.conf.ts
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
const path = require('path');
const merge = require('webpack-merge');
const common = require('./config/webpack.common.config.js');
const webpackConfig = merge(common, {
devtool: 'inline-source-map'
});
module.exports = (config) => {
config.set({
basePath: '',
frameworks: ['jasmine'],
client:{
clearContext: false
},
files: [
'./src/**/*.spec.ts'
],
preprocessors: {
'./src/**/*.spec.ts': ['webpack', 'sourcemap']
},
mime: {
'text/x-typescript': ['ts','tsx']
},
webpack: webpackConfig,
webpackServer: {
noInfo: true
},
webpackMiddleware: {
stats: 'errors-only'
},
customLaunchers: {
'SL_Chrome': {
base: 'SauceLabs',
browserName: 'chrome'
}
},
sauceLabs: {
testName: 'Maia',
retryLimit: 3,
startConnect: false,
recordVideo: false,
recordScreenshots: false,
options: {
'selenium-version': '2.53.0',
'command-timeout': 600,
'idle-timeout': 600,
'max-duration': 5400,
}
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false
});
if (process.env.TRAVIS) {
var buildId =
'TRAVIS #' + process.env.TRAVIS_BUILD_NUMBER + ' (' + process.env.TRAVIS_BUILD_ID + ')';
config.sauceLabs.build = buildId;
config.sauceLabs.tunnelIdentifier = process.env.TRAVIS_JOB_NUMBER;
config.browsers = Object.keys(config.customLaunchers);
config.singleRun = true;
config.reporters = config.reporters.concat(['saucelabs']);
config.transports = ['polling'];
}
}