commit | author | age
|
2f5b9b
|
1 |
// Karma configuration file, see link for more information |
B |
2 |
// https://karma-runner.github.io/0.13/config/configuration-file.html |
|
3 |
|
|
4 |
module.exports = function (config) { |
|
5 |
config.set({ |
|
6 |
basePath: './', |
|
7 |
frameworks: ['jasmine', '@angular/cli'], |
|
8 |
plugins: [ |
|
9 |
require('karma-jasmine'), |
|
10 |
require('karma-chrome-launcher'), |
|
11 |
require('karma-jasmine-html-reporter'), |
|
12 |
require('karma-coverage-istanbul-reporter'), |
|
13 |
require('@angular/cli/plugins/karma') |
|
14 |
], |
|
15 |
client:{ |
|
16 |
clearContext: false // leave Jasmine Spec Runner output visible in browser |
|
17 |
}, |
|
18 |
files: [ |
|
19 |
{ pattern: './src/test.ts', watched: false }, |
|
20 |
{ pattern: 'src/assets/**/*', watched: false, included: false, served: true }, |
|
21 |
], |
|
22 |
proxies: { |
|
23 |
'/assets/': '/base/src/assets/' |
|
24 |
}, |
|
25 |
preprocessors: { |
|
26 |
'./src/test.ts': ['@angular/cli'] |
|
27 |
}, |
|
28 |
mime: { |
|
29 |
'text/x-typescript': ['ts','tsx'] |
|
30 |
}, |
|
31 |
coverageIstanbulReporter: { |
|
32 |
reports: [ 'html', 'lcovonly' ], |
|
33 |
fixWebpackSourcePaths: true |
|
34 |
}, |
|
35 |
angularCli: { |
|
36 |
environment: 'dev' |
|
37 |
}, |
|
38 |
reporters: config.angularCli && config.angularCli.codeCoverage |
|
39 |
? ['progress', 'coverage-istanbul'] |
|
40 |
: ['progress', 'kjhtml'], |
|
41 |
port: 9876, |
|
42 |
colors: true, |
|
43 |
logLevel: config.LOG_INFO, |
|
44 |
autoWatch: true, |
|
45 |
browsers: ['Chrome'], |
|
46 |
singleRun: false, |
|
47 |
captureTimeout: 60000, // it was already there |
|
48 |
browserDisconnectTimeout : 60000, |
|
49 |
browserDisconnectTolerance : 1, |
|
50 |
browserNoActivityTimeout : 60000 //by default 10000 |
|
51 |
}); |
|
52 |
}; |