summaryrefslogtreecommitdiffstats
path: root/karma.conf.js
diff options
context:
space:
mode:
authorHendrik Leppelsack <hendrik@leppelsack.de>2016-03-17 14:34:21 +0100
committerHendrik Leppelsack <hendrik@leppelsack.de>2016-03-17 16:36:53 +0100
commitdbaa73a90c36cc00d34d71d3824713340d9c6dfd (patch)
tree9bdff7ed943e9198ab93a9fb92b891f61cd0b166 /karma.conf.js
parent755897e247c7a443e2e4af77ad39591c3a089eed (diff)
add karma (+mocha, chai, sinon)
Diffstat (limited to 'karma.conf.js')
-rw-r--r--karma.conf.js88
1 files changed, 88 insertions, 0 deletions
diff --git a/karma.conf.js b/karma.conf.js
new file mode 100644
index 00000000..24e1ac11
--- /dev/null
+++ b/karma.conf.js
@@ -0,0 +1,88 @@
+module.exports = function(config) {
+ config.set({
+
+ // base path that will be used to resolve all patterns (eg. files, exclude)
+ basePath: '',
+
+
+ // frameworks to use
+ // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
+ frameworks: ['mocha', 'chai', 'sinon'],
+
+
+ // list of files / patterns to load in the browser
+ files: [
+ 'js/vendor/angular/angular.js',
+ 'js/vendor/angular-route/angular-route.js',
+ 'js/vendor/angular-uuid4/angular-uuid4.js',
+ 'js/vendor/angular-cache/dist/angular-cache.js',
+ 'js/vendor/angular-sanitize/angular-sanitize.js',
+ 'js/vendor/ui-select/dist/select.js',
+
+ 'js/dav/dav.js',
+ 'js/vendor/vcard/src/vcard.js',
+
+ 'js/vendor/angular-mocks/angular-mocks.js',
+
+ 'js/public/script.js',
+
+ 'js/vendor/angular-bootstrap/ui-bootstrap.min.js',
+
+ 'js/tests/**/*.js'
+ ],
+
+
+ // list of files to exclude
+ exclude: [
+ ],
+
+
+ // preprocess matching files before serving them to the browser
+ // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
+ preprocessors: {
+ 'js/public/script.js': 'coverage'
+ },
+
+
+ // test results reporter to use
+ // possible values: 'dots', 'progress'
+ // available reporters: https://npmjs.org/browse/keyword/karma-reporter
+ reporters: ['mocha', 'coverage'],
+
+
+ coverageReporter: {
+ type: 'text'
+ },
+
+
+ // web server port
+ port: 9876,
+
+
+ // enable / disable colors in the output (reporters and logs)
+ colors: true,
+
+
+ // level of logging
+ // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
+ logLevel: config.LOG_INFO,
+
+
+ // enable / disable watching file and executing tests whenever any file changes
+ autoWatch: false,
+
+
+ // start these browsers
+ // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
+ browsers: ['Chrome'],
+
+
+ // Continuous Integration mode
+ // if true, Karma captures browsers, runs the tests and exits
+ singleRun: true,
+
+ // Concurrency level
+ // how many browser should be started simultaneous
+ concurrency: Infinity
+ })
+}