-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.conf.js
75 lines (67 loc) · 2.4 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
65
66
67
68
69
70
71
72
73
74
75
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
return config.set({
frameworks: ['jasmine', 'karma-typescript', 'source-map-support'],
files: [
{ pattern: 'src/**/*.ts', esModule: true },
{ pattern: 'src/**/*.fixture', included: false, watched: false, served: true },
{ pattern: 'src/**/*.pem', included: false, watched: false, served: true },
{ pattern: 'src/**/*.der', included: false, watched: false, served: true },
// { pattern: "src/**/schema_parser/bin/**", included: false, watched: false},
// { pattern: "src/**/*.d.ts", included: false, watched: false},
// { pattern: "src/schema_parser/**", included: false, watched: false},
// { pattern: "src/**/node_modules/*", included: false, watched: false}
],
exclude: ['src/**/*.d.ts', 'src/**/schema_parser/**', 'src/**/node_modules/**'],
preprocessors: {
'src/**/*.ts': ['karma-typescript'],
},
karmaTypescriptConfig: {
tsconfig: './src/tsconfig.esm.json',
compilerOptions: {
//noEmitOnError: true,
module: 'commonjs',
target: 'ES2015',
},
coverageOptions: {
exclude: [/\.(d|spec|e2e-spec)\.ts$/i, /(generated)/, /(tcp_transport)/, /(constants)/],
instrumentation: false,
},
bundlerOptions: {
entrypoints: /\.spec\.ts$/,
// transforms: [require('karma-typescript-es6-transform')()],
},
exclude: ['./**/node_modules', './schema_parser/**/*'],
},
/*
plugins: [
'karma-jasmine',
'karma-chrome-launcher',
'karma-jasmine-html-reporter',
'karma-coverage-istanbul-reporter',
'karma-typescript',
'karma-source-map-support',
],
*/
client: {
clearContext: false, // leave Jasmine Spec Runner output visible in browser
jasmine: {
timeoutInterval: 10000, // increase the default timeout to 10s
},
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, './coverage'),
reports: ['html', 'lcovonly'],
fixWebpackSourcePaths: true,
},
reporters: ['verbose', 'kjhtml', 'karma-typescript'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
restartOnFileChange: true,
singleRun: false,
});
};