-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.conf.ts
48 lines (46 loc) · 1.44 KB
/
karma.conf.ts
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
import * as karma from 'karma';
import * as path from 'path';
export = function (config : karma.Config) {
config.set(<karma.ConfigOptions & { webpack }>{
basePath: '',
files: [
{ pattern: 'src/*.test.ts' },
{ pattern: 'src/browser/**/*.test.ts' }
],
browsers: ['Chrome'],
preprocessors: {
'**/*.test.ts': ['webpack']
},
webpack: {
devtool: 'inline-source-map',
externals: {
fs: 'undefined'
},
module: {
rules: [
{
test: /\.ts$/,
include: path.join(__dirname, 'src'),
use: [
{
loader: 'ts-loader',
options: {
compilerOptions: {
module: "ES2015",
target: "ES2015",
moduleResolution: "node"
}
}
}
]
}
]
},
resolve: {
extensions: [ '.ts', '.js' ],
},
},
reporters: [ 'progress' ],
webpackMiddleware: { stats: 'errors-only' },
});
}