forked from conversejs/converse.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkarma.conf.js
More file actions
135 lines (118 loc) · 4.6 KB
/
karma.conf.js
File metadata and controls
135 lines (118 loc) · 4.6 KB
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
/* global module */
const path = require('path');
module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
frameworks: ['jasmine'],
files: [
{ pattern: 'dist/*.js.map', included: false },
{ pattern: 'dist/*.css.map', included: false },
{ pattern: 'src/headless/dist/*.js.map', included: false },
{
pattern: "dist/emoji.json",
watched: false,
included: false,
served: true,
type: 'json'
},
"src/shared/tests/tests.css",
"dist/converse.js",
"dist/converse.css",
{ pattern: "dist/images/**/*.*", included: false },
{ pattern: "dist/webfonts/**/*.*", included: false },
{ pattern: "logo/conversejs-filled.svg",
watched: false,
included: false,
served: true,
nocache: false
},
{ pattern: "logo/conversejs-filled-192.svg",
watched: false,
included: false,
served: true,
nocache: false
},
{ pattern: "logo/conversejs-filled-192.png",
watched: false,
included: false,
served: true,
nocache: false
},
{ pattern: "src/shared/tests/mock.js", type: 'module' },
{ pattern: "src/headless/tests/mock.js", type: 'module' },
// Ideally this should go into the headless test runner
{ pattern: "src/headless/plugins/vcard/tests/update.js", type: 'module' },
{ pattern: "src/i18n/tests/i18n.js", type: 'module' },
{ pattern: "src/plugins/adhoc-views/tests/*.js", type: 'module' },
{ pattern: "src/plugins/bookmark-views/tests/*.js", type: 'module' },
{ pattern: "src/plugins/chatview/tests/*.js", type: 'module' },
{ pattern: "src/plugins/controlbox/tests/*.js", type: 'module' },
{ pattern: "src/plugins/disco-views/tests/*.js", type: 'module' },
{ pattern: "src/plugins/headlines-view/tests/*.js", type: 'module' },
{ pattern: "src/plugins/mam-views/tests/*.js", type: 'module' },
{ pattern: "src/plugins/minimize/tests/*.js", type: 'module' },
{ pattern: "src/plugins/muc-views/tests/*.js", type: 'module' },
{ pattern: "src/plugins/notifications/tests/*.js", type: 'module' },
{ pattern: "src/plugins/omemo-views/tests/*.js", type: 'module' },
{ pattern: "src/plugins/profile/tests/*.js", type: 'module' },
{ pattern: "src/plugins/push/tests/*.js", type: 'module' },
{ pattern: "src/plugins/register/tests/*.js", type: 'module' },
{ pattern: "src/plugins/roomslist/tests/*.js", type: 'module' },
{ pattern: "src/plugins/rootview/tests/*.js", type: 'module' },
{ pattern: "src/plugins/rosterview/tests/*.js", type: 'module' },
{ pattern: "src/plugins/rosterview/tests/requesting_contacts.js", type: 'module' },
{ pattern: "src/shared/modals/tests/*.js", type: 'module' },
{ pattern: "src/utils/tests/*.js", type: 'module' },
],
proxies: {
"/dist/emoji.json": "/base/dist/emoji.json",
"/dist/images/custom_emojis/": "/base/dist/images/custom_emojis/",
"/images/logo/": "/base/dist/images/logo/"
},
client: {
jasmine: {
random: false
}
},
exclude: ['**/*.sw?'],
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {},
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['progress', 'kjhtml'],
webpack: {
mode: 'development',
devtool: 'inline-source-map',
module: {
rules: [{
test: /\.js$/,
exclude: /(node_modules|test)/
}]
},
output: {
path: path.resolve('test'),
filename: '[name].out.js',
chunkFilename: '[id].[chunkHash].js'
}
},
port: 9876,
colors: true,
// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,
// enable / disable watching file and executing tests whenever any file changes
autoWatch: true,
// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['Chrome'],
// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: false,
// Concurrency level
// how many browser should be started simultaneous
concurrency: Infinity
})
}