|
1 | 1 | // Karma configuration file, see link for more information
|
2 | 2 | // https://karma-runner.github.io/0.13/config/configuration-file.html
|
3 | 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 |
| - ], |
21 |
| - preprocessors: { |
22 |
| - './src/test.ts': ['@angular/cli'] |
23 |
| - }, |
24 |
| - mime: { |
25 |
| - 'text/x-typescript': ['ts','tsx'] |
26 |
| - }, |
27 |
| - coverageIstanbulReporter: { |
28 |
| - reports: [ 'html', 'lcovonly' ], |
29 |
| - fixWebpackSourcePaths: true |
30 |
| - }, |
31 |
| - angularCli: { |
32 |
| - environment: 'dev' |
33 |
| - }, |
34 |
| - reporters: config.angularCli && config.angularCli.codeCoverage |
35 |
| - ? ['progress', 'coverage-istanbul'] |
36 |
| - : ['progress', 'kjhtml'], |
37 |
| - port: 9876, |
38 |
| - colors: true, |
39 |
| - logLevel: config.LOG_INFO, |
40 |
| - autoWatch: true, |
41 |
| - browsers: ['Chrome'], |
42 |
| - singleRun: false |
43 |
| - }); |
| 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: [{ pattern: './src/test.ts', watched: false }], |
| 19 | + preprocessors: { |
| 20 | + './src/test.ts': ['@angular/cli'] |
| 21 | + }, |
| 22 | + mime: { |
| 23 | + 'text/x-typescript': ['ts', 'tsx'] |
| 24 | + }, |
| 25 | + coverageIstanbulReporter: { |
| 26 | + reports: ['html', 'lcovonly'], |
| 27 | + fixWebpackSourcePaths: true |
| 28 | + }, |
| 29 | + angularCli: { |
| 30 | + environment: 'dev' |
| 31 | + }, |
| 32 | + reporters: |
| 33 | + config.angularCli && config.angularCli.codeCoverage |
| 34 | + ? ['progress', 'coverage-istanbul'] |
| 35 | + : ['progress', 'kjhtml'], |
| 36 | + port: 9876, |
| 37 | + colors: true, |
| 38 | + logLevel: config.LOG_INFO, |
| 39 | + autoWatch: true, |
| 40 | + browsers: ['Chrome'], |
| 41 | + singleRun: false |
| 42 | + }); |
44 | 43 | };
|
0 commit comments