-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathkarma.config.js
More file actions
38 lines (34 loc) · 1.2 KB
/
karma.config.js
File metadata and controls
38 lines (34 loc) · 1.2 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
/*
* Copyright (c) 2021 Coremail.cn, Ltd. All Rights Reserved.
*/
const webpackConfig = Object.assign({}, require('./webpack.config')(1));
delete webpackConfig.entry;
delete webpackConfig.output;
module.exports = config => {
config.set({
webpack : webpackConfig,
files : ['test/index.js'],
preprocessors : {'test/index.js' : ['webpack', 'sourcemap']},
frameworks : ['jasmine', 'webpack', 'detectBrowsers'],
reporters : ['mocha'],
singleRun : true,
plugins : [
'karma-jasmine',
'karma-mocha-reporter',
'karma-sourcemap-loader',
'karma-webpack',
'karma-chrome-launcher',
'karma-safari-launcher',
'karma-firefox-launcher',
'karma-ie-launcher',
'karma-edge-launcher',
'karma-detect-browsers',
],
client : {jasmine : {random : false}},
detectBrowsers : {
usePhantomJS : false,
// ref: https://github.com/karma-runner/karma-safari-launcher/issues/12
'postDetection' : availableBrowser => availableBrowser.filter(name => name !== 'Safari'),
},
});
};