forked from taion/react-router-scroll
-
Notifications
You must be signed in to change notification settings - Fork 17
/
karma.conf.js
47 lines (38 loc) · 1.05 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
const babel = require('rollup-plugin-babel');
const resolve = require('rollup-plugin-node-resolve');
const commonjs = require('rollup-plugin-commonjs');
const replace = require('rollup-plugin-replace');
module.exports = (config) => {
const { env } = process;
config.set({
frameworks: ['mocha', 'sinon-chai'],
files: [{ pattern: 'test/*.test.js', watched: false }],
preprocessors: {
'test/*.test.js': ['rollup'],
},
rollupPreprocessor: {
plugins: [
babel({ exclude: 'node_modules/**' }),
resolve(),
commonjs({ include: 'node_modules/**' }),
replace({
'process.env.NODE_ENV': JSON.stringify('test'),
}),
],
format: 'iife',
name: 'reactRouterScroll',
sourcemap: 'inline',
},
reporters: ['mocha'],
mochaReporter: {
output: 'minimal',
},
customLaunchers: {
ChromeCi: {
base: 'Chrome',
flags: ['--no-sandbox'],
},
},
browsers: env.BROWSER ? env.BROWSER.split(',') : ['Chrome', 'Firefox'],
});
};