forked from arve0/react-animate-on-change
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathkarma.conf.js
45 lines (42 loc) · 1.04 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
const { SourceMapDevToolPlugin } = require('webpack')
const w = require('./webpack.config')
const { plugins = [] } = w
const webpack = {
...w,
...{
plugins: [
...plugins,
// enable source map for jsx (see github)
new SourceMapDevToolPlugin({
test: /\.(js|css|jsx|ts|tsx)($|\?)/i,
moduleFilenameTemplate: '[absolute-resource-path]',
fallbackModuleFilenameTemplate: '[absolute-resource-path]?[hash]',
}),
],
devtool: 'inline-source-map',
output: {},
externals: [],
},
}
module.exports = (config) => {
config.set({
frameworks: ['jasmine'],
customLaunchers: {
ChromeDebugging: {
base: 'ChromeHeadless',
flags: ['--remote-debugging-port=9333'],
},
},
browsers: ['ChromeDebugging'],
files: [
{ pattern: 'test/*.jsx', watched: false },
],
preprocessors: {
'test/*.jsx': ['webpack', 'sourcemap'],
},
webpack,
proxies: {
'/node_modules/preact/dist/preact.esm.js.map': '/base/test/preact.esm.js.map',
},
})
}