forked from threema-ch/threema-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
78 lines (69 loc) · 2.77 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
module.exports = function(config) {
var configuration = {
frameworks: ['jasmine'],
mime: {
'application/wasm': ['wasm'],
},
files: [
// Angular core
'node_modules/angular/angular.js',
'node_modules/angular-aria/angular-aria.min.js',
'node_modules/angular-animate/angular-animate.min.js',
'node_modules/angular-sanitize/angular-sanitize.min.js',
'node_modules/angular-route/angular-route.min.js',
'node_modules/angular-material/angular-material.min.js',
'node_modules/angular-translate/dist/angular-translate.min.js',
// Angular mocking
'node_modules/angular-mocks/angular-mocks.js',
// Polyfills
'node_modules/setimmediate/setImmediate.js',
// SaltyRTC
'node_modules/@saltyrtc/chunked-dc/dist/chunked-dc.es5.js',
// App bundles
'dist/generated/app_noinit.bundle.js',
'dist/generated/userconfig.js',
'dist/generated/userconfig.overrides.js',
'dist/generated/unittest_karma.bundle.js',
{pattern: 'dist/generated/src_*.bundle.js', included: false, serve: true},
{pattern: 'dist/generated/tests_*.bundle.js', included: false, serve: true},
{pattern: 'dist/generated/vendors-node_*.bundle.js', included: false, serve: true},
{pattern: 'dist/generated/*.module.wasm', included: false, serve: true, type: 'wasm'},
// Tests
'tests/init.js',
'tests/filters.js',
'tests/service/message.js',
'tests/service/mime.js',
'tests/service/qrcode.js',
'tests/service/uri.js',
'tests/service/string.js',
'tests/service/browser.js',
'tests/service/keystore.js',
'tests/service/log.js',
'tests/service/notification.js',
'tests/service/receiver.js',
],
proxies: {
// Also serve all generated files on the root.
// This is required for the .wasm modules.
'/dist/generated/': '/base/dist/generated/',
},
customLaunchers: {
Chromium_ci_gitlab: {
base: 'Chromium',
flags: ['--no-sandbox'],
},
Chrome_ci_circle: {
base: 'Chrome',
flags: ['--no-sandbox'],
},
}
};
if (process.env.GITLAB_CI) {
configuration.browsers = ['Chromium_ci_gitlab', 'Firefox'];
} else if (process.env.CIRCLECI) {
configuration.browsers = ['Chrome_ci_circle', 'Firefox'];
} else {
configuration.browsers = ['Chromium', 'Firefox'];
}
config.set(configuration);
};