-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathkarma.conf.cjs
41 lines (40 loc) · 987 Bytes
/
karma.conf.cjs
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
/**
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
module.exports = function(config) {
config.set({
basePath: './',
browsers: ['FirefoxHeadless'],
frameworks: ['jasmine', 'webpack'],
files: [
// set watched=false as we use webpacks watcher
{ pattern: 'src/**/*.js', type: 'module', watched: false },
{ pattern: 'test/unit/**/*.js', type: 'module', watched: false }
],
preprocessors: {
'js/**/*.js': ['coverage'],
'src/**/*.js': ['webpack'],
'test/**/*.js': ['webpack']
},
webpack: {},
reporters: ['mocha', 'coverage'],
port: 9876, // karma web server port
colors: true,
logLevel: config.LOG_INFO,
autoWatch: false,
singleRun: true,
concurrency: Infinity,
coverageReporter: {
type: 'lcov',
dir: 'coverage/'
},
plugins: [
'karma-jasmine',
'karma-coverage',
'karma-firefox-launcher',
'karma-mocha-reporter',
'karma-webpack'
]
});
};