module.exports = function (config) {
    
    config.set({
        
        basePath: './',
        
        files: [
            { pattern: 'node_modules/reflect-metadata/Reflect.js' },
            { pattern: 'src/*.ts' },
            { pattern: 'src/**/*.ts' },
            { pattern: 'test/*.ts' }
        ],

        exclude: [
            '*index.ts',
            '*index.d.ts'
        ],

        preprocessors: {
            '**/*.ts': ['karma-typescript']
        },

        frameworks: ['jasmine', 'karma-typescript'],
        browsers: ['Chrome'],
        plugins: [
            'karma-jasmine',
            'karma-spec-reporter',
            'karma-chrome-launcher',
            'karma-typescript'
        ],

        karmaTypescriptConfig: {
            reports: {
                'text-summary': '',
                html: 'coverage',
                lcovonly: 'coverage'
            },
            coverageOptions: {
                exclude: /((\.(d|spec|test|module))|index\.ts)/
            },
            compilerOptions: {
              lib: ['es6', 'dom']
            }
        },
        
        reporters: ['spec', 'karma-typescript'],
        singleRun: true,
        autoWatch: false,
        colors: true,
        logLevel: config.LOG_INFO
    });
    
}

module.exports = function (config) {
    
    config.set({
        
        basePath: './',
        
        files: [
            { pattern: 'node_modules/reflect-metadata/Reflect.js' },
            { pattern: 'src/*.ts' },
            { pattern: 'src/**/*.ts' },
            { pattern: 'test/*.ts' }
        ],

        exclude: [],

        preprocessors: {
            '**/*.ts': ['karma-typescript']
        },

        frameworks: ['jasmine', 'karma-typescript'],
        browsers: ['Chrome'],
        plugins: [
            'karma-jasmine',
            'karma-spec-reporter',
            'karma-chrome-launcher',
            'karma-typescript'
        ],

        karmaTypescriptConfig: {
            reports: {
                'text-summary': '',
                html: 'coverage',
                lcovonly: 'coverage'
            },
            coverageOptions: {
                exclude: /((\.(d|spec|test|module))|index\.ts)/
            },
            compilerOptions: {
              lib: ['es6', 'dom']
            }
        },
        
        reporters: ['spec', 'karma-typescript'],
        singleRun: true,
        autoWatch: false,
        colors: true,
        logLevel: config.LOG_INFO
    });
    
}

tweak to Karma