UNPKG

1.29 kBJavaScriptView Raw
1// Karma configuration file, see link for more information
2// https://karma-runner.github.io/0.13/config/configuration-file.html
3
4module.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-phantomjs-launcher'),*/
12 require('karma-jasmine-html-reporter'),
13 require('karma-coverage-istanbul-reporter'),
14 require('@angular/cli/plugins/karma')
15 ],
16 client:{
17 clearContext: false // leave Jasmine Spec Runner output visible in browser
18 },
19 files: [
20 { pattern: './src/test.ts', watched: false }
21 ],
22 preprocessors: {
23 './src/test.ts': ['@angular/cli']
24 },
25 mime: {
26 'text/x-typescript': ['ts','tsx']
27 },
28 coverageIstanbulReporter: {
29 reports: [ 'html', 'lcovonly' ],
30 fixWebpackSourcePaths: true
31 },
32 angularCli: {
33 environment: 'dev'
34 },
35 reporters: config.angularCli && config.angularCli.codeCoverage
36 ? ['progress', 'coverage-istanbul']
37 : ['progress', 'kjhtml'],
38 port: 9876,
39 colors: true,
40 logLevel: config.LOG_INFO,
41 autoWatch: true,
42 browsers: ['Chrome'],
43 singleRun: false
44 });
45};