-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.conf.js
64 lines (53 loc) · 1.18 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
module.exports = function (config) {
config.set({
frameworks: ['mocha', 'webpack'],
plugins: [
'karma-mocha',
'karma-webpack',
'karma-spec-reporter',
'karma-chrome-launcher'
],
files: ['specs/**/*.spec.ts'],
preprocessors: {
'specs/**/*.spec.ts': ['webpack'],
},
client: {
mocha: {
timeout: 20000,
}
},
browserNoActivityTimeout: 400000,
logLevel: config.DEBUG,
browsers: ['Chrome_with_third_party_cookies'],
customLaunchers: {
Chrome_with_third_party_cookies: {
base: 'ChromeHeadless',
flags: ['--disable-web-security']
}
},
reporters: ['spec'],
singleRun: true,
webpack: {
resolve: {
extensions: ['.ts', '.js']
},
module: {
rules: [
{
test: /\.tsx?$/,
use: {
loader: "ts-loader",
options: {
transpileOnly: true
},
},
exclude: (e) => {
let file = e.replace(__dirname, '.');
return file.match(/node_modules/)
}
},
],
},
},
});
};