forked from google/timesketch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.conf.js
executable file
·49 lines (46 loc) · 1.06 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
const path = require('path')
const webpack_test_config = {
entry: './timesketch/ui/main.spec.ts',
module: {
rules: [
{
test: /\.tsx?$/,
use: ['ts-loader', 'angular2-template-loader'],
exclude: /node_modules/,
},
{
test: /\.s?css$/,
use: 'null-loader',
},
{
test: /\.html$/,
loader: 'raw-loader',
},
],
},
resolve: {
extensions: ['.tsx', '.ts', '.js'],
modules: [path.resolve(__dirname, 'timesketch/ui/'), 'node_modules'],
},
}
module.exports = function(config) {
config.set({
files: [
'./node_modules/babel-polyfill/dist/polyfill.js',
'timesketch/ui/main.spec.ts',
],
preprocessors: {'timesketch/ui/main.spec.ts': ['webpack']},
webpack: webpack_test_config,
webpackMiddleware: {
noInfo: true,
stats: {chunks: false},
},
frameworks: ['jasmine'],
plugins: [
require('karma-webpack'),
require('karma-jasmine'),
require('karma-phantomjs-launcher'),
],
browsers: ['PhantomJS'],
})
}