-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathkarma.conf.js
50 lines (50 loc) · 1.3 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
module.exports = function (config) {
config.set({
frameworks: ['mocha', 'chai', 'karma-typescript'],
files: [
'src/**/*.+(ts|tsx)', // *.tsx for React Jsx
{
pattern: 'node_modules/@dittolive/ditto/web/ditto.wasm',
included: false,
served: true,
type: 'wasm',
},
],
preprocessors: {
'**/*.+(ts|tsx)': ['karma-typescript'],
},
reporters: ['mocha', 'karma-typescript'],
port: 9876, // karma web server port
colors: true,
logLevel: config.LOG_INFO,
browsers: ['ChromeHeadless'],
autoWatch: false,
// singleRun: false, // Karma captures browsers, runs the tests and exits
concurrency: Infinity,
singleRun: true,
mime: {
'application/wasm': ['wasm'],
},
karmaTypescriptConfig: {
tsconfig: './tsconfig.json',
bundlerOptions: {
// Explicitly configure Karma's parser to expect ES2020 syntax.
acornOptions: {
ecmaVersion: 2020,
},
transforms: [
require('karma-typescript-es6-transform')({
presets: [['@babel/preset-env']],
}),
],
},
},
parallelOptions: {
executors: 8, // Defaults to cpu-count - 1
shardStrategy: 'round-robin',
},
client: {
captureConsole: true,
},
})
}