forked from alexdrel/i18n-react
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.config.js
60 lines (51 loc) · 1.4 KB
/
karma.config.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
52
53
54
55
56
57
58
59
60
// Karma configuration
module.exports = function (config) {
config.set({
// ... normal karma configuration
basePath: '',
frameworks: ['jasmine'],
mime: {
'text/x-typescript': ['ts','tsx']
},
files: [
"https://cdnjs.cloudflare.com/ajax/libs/react/16.0.0/umd/react.development.js",
"https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.0.0/umd/react-dom-server.browser.development.js",
// all files ending in "_test"
'tests/*_test.*',
'tests/**/*_test.*'
// each file acts as entry point for the webpack configuration
],
preprocessors: {
// add webpack as preprocessor
'tests/*_test.*': ['webpack', 'sourcemap'],
'tests/**/*_test.*': ['webpack', 'sourcemap']
},
port: 8055,
logLevel: config.LOG_INFO,
colors: true,
autoWatch: true,
browsers: ['Chrome'],
reporters: ['progress'],
captureTimeout: 60000,
singleRun: false,
webpack: {
cache: true,
devtool: 'inline-source-map',
stats: false,
resolve: {
extensions: ['.js', '.jsx', '.ts', '.tsx']
},
externals: {
"react": "React",
"react-dom": "ReactDOM",
"react-dom-server": "ReactDOMServer",
},
module: {
loaders: [
{ test: /\.tsx?$/, loader: 'ts-loader' },
{ test: /\.jsx?$/, loader: 'jsx-loader?harmony' }
]
},
},
});
};