|
1
|
|
|
// Karma configuration file, see link for more information |
|
2
|
|
|
// https://karma-runner.github.io/1.0/config/configuration-file.html |
|
3
|
|
|
|
|
4
|
|
|
const { join } = require('path'); |
|
5
|
|
|
const { constants } = require('karma'); |
|
6
|
|
|
|
|
7
|
|
|
module.exports = () => { |
|
8
|
|
|
return { |
|
9
|
|
|
basePath: '', |
|
10
|
|
|
frameworks: ['jasmine', '@angular-devkit/build-angular'], |
|
11
|
|
|
plugins: [ |
|
12
|
|
|
require('karma-jasmine'), |
|
13
|
|
|
require('karma-chrome-launcher'), |
|
14
|
|
|
require('karma-jasmine-html-reporter'), |
|
15
|
|
|
require('karma-coverage'), |
|
16
|
|
|
require('@angular-devkit/build-angular/plugins/karma'), |
|
17
|
|
|
], |
|
18
|
|
|
client: { |
|
19
|
|
|
jasmine: { |
|
20
|
|
|
// you can add configuration options for Jasmine here |
|
21
|
|
|
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html |
|
22
|
|
|
// for example, you can disable the random execution with `random: false` |
|
23
|
|
|
// or set a specific seed with `seed: 4321` |
|
24
|
|
|
}, |
|
25
|
|
|
clearContext: false, // leave Jasmine Spec Runner output visible in browser |
|
26
|
|
|
}, |
|
27
|
|
|
jasmineHtmlReporter: { |
|
28
|
|
|
suppressAll: true, // removes the duplicated traces |
|
29
|
|
|
}, |
|
30
|
|
|
coverageReporter: { |
|
31
|
|
|
dir: join(__dirname, './coverage'), |
|
32
|
|
|
subdir: '.', |
|
33
|
|
|
reporters: [{ type: 'html' }, { type: 'text-summary' }], |
|
34
|
|
|
}, |
|
35
|
|
|
reporters: ['progress', 'kjhtml'], |
|
36
|
|
|
port: 9876, |
|
37
|
|
|
colors: true, |
|
38
|
|
|
logLevel: constants.LOG_INFO, |
|
39
|
|
|
autoWatch: true, |
|
40
|
|
|
browsers: ['Chrome'], |
|
41
|
|
|
singleRun: true, |
|
42
|
|
|
}; |
|
43
|
|
|
}; |
|
44
|
|
|
|