forked from slab/quill
-
Notifications
You must be signed in to change notification settings - Fork 2
/
karma.config.js
66 lines (60 loc) · 1.78 KB
/
karma.config.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
const browsers = require('./browsers');
const sauce = require('./sauce');
module.exports = config => {
config.set({
basePath: '../',
urlRoot: '/karma/',
port: process.env.npm_package_config_ports_karma,
files: [
{
pattern:
'http://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.7.1/katex.min.js',
served: true,
},
{ pattern: 'dist/quill.snow.css', nocache: true },
{ pattern: 'dist/unit.js', nocache: true },
{ pattern: 'dist/*.map', included: false, served: true, nocache: true },
{ pattern: 'assets/favicon.png', included: false, served: true },
],
proxies: {
'/assets/': '/karma/base/assets/',
},
frameworks: ['jasmine'],
reporters: ['progress'],
colors: true,
autoWatch: false,
singleRun: true,
browsers: ['Chrome'],
client: {
useIframe: true,
},
coverageReporter: {
dir: '.coverage',
reporters: [{ type: 'text' }, { type: 'html' }],
},
sauceLabs: {
testName: 'quill-unit',
options: {
public: 'public',
'record-screenshots': false,
},
build: sauce.build,
// There is no way to securely allow community PRs to be built and tested
// by Travis and SauceLabs. Please do not abuse.
username: 'quill',
accessKey: 'ced60aed-80ad-436b-9ba8-690ed1205180',
tunnelIdentifier: sauce.tunnel,
},
customLaunchers: browsers,
});
/* eslint-disable no-param-reassign */
if (process.env.CI) {
config.transports = ['polling'];
config.browsers = [process.env.BROWSER];
config.browserDisconnectTimeout = 10000;
config.browserDisconnectTolerance = 3;
config.browserNoActivityTimeout = 60000;
config.browserSocketTimeout = 40000;
config.captureTimeout = 120000;
}
};