forked from OctoLinker/OctoLinker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
51 lines (47 loc) · 1.27 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
const webpackConfig = require('./webpack.config');
webpackConfig.devtool = 'inline-source-map';
if (process.env.APPVEYOR) {
require('phantomjs-prebuilt').path = ''; // eslint-disable-line
}
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['detectBrowsers', 'mocha', 'fixture'],
detectBrowsers: {
postDetection(availableBrowsers) {
return availableBrowsers
.filter(browser => ['Chrome', 'Firefox'].includes(browser))
.map((browser) => {
if (browser === 'Chrome' && process.env.TRAVIS) {
return 'Chrome_travis_ci';
}
return browser;
});
},
},
customLaunchers: {
Chrome_travis_ci: {
base: 'Chrome',
flags: ['--no-sandbox'],
},
},
files: [
'test/main-lib.js',
'test/main-packages.js',
'packages/*/fixtures/**/*.html',
],
exclude: [],
preprocessors: {
'test/main-lib.js': ['webpack', 'sourcemap'],
'test/main-packages.js': ['webpack', 'sourcemap'],
'packages/*/fixtures/**/*.html': ['html2js'],
},
webpack: webpackConfig,
webpackMiddleware: {
noInfo: true,
},
reporters: ['mocha'],
browsers: ['PhantomJS'],
singleRun: true,
});
};