-
Notifications
You must be signed in to change notification settings - Fork 30
/
karma.config.cjs
61 lines (59 loc) · 1.93 KB
/
karma.config.cjs
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
const webpackConfig = require('./webpack.dev.js')
const TEST_TIMEOUT_MS = 400_000
module.exports = function (config) {
config.set({
// base path that will be used to resolve all patterns (e.g. files, exclude)
basePath: '',
frameworks: ['webpack', 'jasmine'],
// list of files / patterns to load in the browser
files: [
'packages/client-common/__tests__/unit/*.test.ts',
'packages/client-common/__tests__/utils/*.ts',
'packages/client-common/__tests__/integration/*.test.ts',
'packages/client-web/__tests__/integration/*.test.ts',
'packages/client-web/__tests__/unit/*.test.ts',
],
exclude: [],
webpack: webpackConfig,
preprocessors: {
'packages/client-common/**/*.ts': ['webpack', 'sourcemap'],
'packages/client-web/**/*.ts': ['webpack', 'sourcemap'],
'packages/client-common/__tests__/unit/*.test.ts': [
'webpack',
'sourcemap',
],
'packages/client-common/__tests__/integration/*.ts': [
'webpack',
'sourcemap',
],
'packages/client-common/__tests__/utils/*.ts': ['webpack', 'sourcemap'],
'packages/client-web/__tests__/unit/*.test.ts': [
'webpack',
'sourcemap',
],
'packages/client-web/__tests__/integration/*.ts': [
'webpack',
'sourcemap',
],
},
reporters: ['mocha'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: false,
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['ChromeHeadless', 'FirefoxHeadless'],
browserNoActivityTimeout: TEST_TIMEOUT_MS,
browserDisconnectTimeout: TEST_TIMEOUT_MS,
// if true, Karma captures browsers, runs the tests and exits
singleRun: true,
client: {
jasmine: {
random: false,
stopOnSpecFailure: false,
stopSpecOnExpectationFailure: true,
timeoutInterval: TEST_TIMEOUT_MS,
},
},
})
}