From 21afe00c53a0c9cdf2fb22d57d9f5adce449f45c Mon Sep 17 00:00:00 2001 From: Tanguy Krotoff Date: Tue, 27 Oct 2015 15:10:06 +0100 Subject: [PATCH] Example of configuration file karma.conf.ts --- karma/karma-tests.ts | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/karma/karma-tests.ts b/karma/karma-tests.ts index 41076cfda4..04f1c49345 100644 --- a/karma/karma-tests.ts +++ b/karma/karma-tests.ts @@ -52,3 +52,43 @@ karma.runner.run({port: 9876}, function(exitCode: number) { // var captured: boolean = karma.launcher.areAllCaptured(); + + +// Example of configuration file karma.conf.ts, see http://karma-runner.github.io/0.13/config/configuration-file.html +module.exports = function(config: karma.Config) { + config.set({ + basePath: '..', + urlRoot: '/base/', + frameworks: ['jasmine'], + + files: [ + 'file1.js', + 'file2.js', + 'file3.js', + { + pattern: '**/*.html', + included: false + } + ], + + reporters: [ + 'progress', + 'coverage' + ], + + preprocessors: { + 'app.js': ['coverage'] + }, + + port: 9876, + + autoWatch: true, + + browsers: [ + 'Chrome', + 'Firefox' + ], + + singleRun: true + }); +};