File: karma.sauce.config.js

package info (click to toggle)
node-raven-js 3.22.1+dfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 1,868 kB
  • sloc: makefile: 144; python: 34; sh: 2
file content (117 lines) | stat: -rw-r--r-- 3,290 bytes parent folder | download
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
var commonConfig = require('./karma.config');

var customLaunchers = {
  sl_chrome: {
    base: 'SauceLabs',
    browserName: 'chrome',
    platform: 'Windows 10',
    version: 'latest'
  },
  sl_firefox: {
    base: 'SauceLabs',
    browserName: 'firefox',
    platform: 'Windows 10',
    version: 'latest'
  },
  sl_edge: {
    base: 'SauceLabs',
    browserName: 'microsoftedge',
    version: 'latest',
    platform: 'Windows 10'
  },
  sl_ie_11: {
    base: 'SauceLabs',
    browserName: 'internet explorer',
    platform: 'Windows 7',
    version: '11'
  },
  sl_ie_10: {
    base: 'SauceLabs',
    browserName: 'internet explorer',
    platform: 'Windows 7',
    version: '10'
  },
  sl_safari: {
    base: 'SauceLabs',
    browserName: 'safari',
    platform: 'OS X 10.12',
    version: '11.0'
  },
  sl_ios: {
    base: 'SauceLabs',
    browserName: 'iphone',
    platform: 'OS X 10.12',
    version: '11.0'
  },
  sl_android_7: {
    base: 'SauceLabs',
    browserName: 'Chrome',
    platform: 'Android',
    version: '7.1',
    device: 'Android GoogleAPI Emulator'
  },
  sl_android_6: {
    base: 'SauceLabs',
    browserName: 'Chrome',
    platform: 'Android',
    version: '6.0',
    device: 'Android Emulator'
  },
  sl_android_5: {
    base: 'SauceLabs',
    browserName: 'android',
    platform: 'Linux',
    version: '5.1'
  },
  sl_android_4: {
    base: 'SauceLabs',
    browserName: 'android',
    platform: 'Linux',
    version: '4.4'
  }
};

var testFiles = [
  {pattern: 'node_modules/es6-promise/dist/es6-promise.auto.js', included: false},
  {pattern: 'node_modules/whatwg-fetch/fetch.js', included: false},
  {pattern: 'test/integration/123', included: false},
  {pattern: 'test/integration/throw-string.js', included: false},
  {pattern: 'test/integration/throw-error.js', included: false},
  {pattern: 'test/integration/throw-object.js', included: false},
  {pattern: 'test/integration/example.json', included: false},
  {pattern: 'test/integration/frame.html', included: false},
  'test/integration/test.js',
  'test/globals.js',
  'build/raven.js',
  'build/raven.test.js'
];

module.exports = function(config) {
  var testConfig = Object.assign({}, commonConfig, {
    files: testFiles,
    logLevel: config.LOG_INFO,
    customLaunchers: customLaunchers,
    browsers: Object.keys(customLaunchers),
    reporters: ['failed', 'saucelabs'],
    singleRun: true,
    plugins: commonConfig.plugins.concat(['karma-sauce-launcher']),
    build: process.env.TRAVIS_BUILD_NUMBER,
    // SauceLabs allows for 2 tunnels only, therefore some browsers will have to wait
    // rather long time. Plus mobile emulators tend to require a lot of time to start up.
    // 10 minutes should be more than enough to run all of them.
    browserNoActivityTimeout: 600000,
    captureTimeout: 600000,
    sauceLabs: {
      startConnect: false,
      // Just something "random" so we don't have to provide additional ENV var when running locally
      tunnelIdentifier: process.env.TRAVIS_JOB_NUMBER || Math.ceil(Math.random() * 1337),
      recordScreenshots: false,
      recordVideo: false,
      testName:
        'Raven.js' +
        (process.env.TRAVIS_JOB_NUMBER ? ' #' + process.env.TRAVIS_JOB_NUMBER : ''),
      public: 'public'
    }
  });
  config.set(testConfig);
};