blob: 06939fb950e669028e5e32d2ce9413e7cdbf6bec [file] [log] [blame]
Matteo Scandolo57483dd2015-11-05 11:58:53 +01001// Karma configuration
2// Generated on Tue Oct 06 2015 09:27:10 GMT+0000 (UTC)
3
4/* eslint indent: [2,2], quotes: [2, "single"]*/
5
6/*eslint-disable*/
7var wiredep = require('wiredep');
8var path = require('path');
9
10var bowerComponents = wiredep({devDependencies: true})[ 'js' ].map(function( file ){
11 return path.relative(process.cwd(), file);
12});
13
14module.exports = function(config) {
15/*eslint-enable*/
16 config.set({
17
18 // base path that will be used to resolve all patterns (eg. files, exclude)
19 basePath: '',
20
21
22 // frameworks to use
23 // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
24 frameworks: ['jasmine'],
25
26
27 // list of files / patterns to load in the browser
28 files: bowerComponents.concat([
29 'xosHelpers/src/*.module.js',
30 'xosHelpers/src/**/*.js',
31 'xosHelpers/spec/**/*.test.js',
32 ]),
33
34
35 // list of files to exclude
36 exclude: [
37 ],
38
39
40 // preprocess matching files before serving them to the browser
41 // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
42 preprocessors: {
43 '**/*.test.js': ['babel'],
44 'src/**/*.html': ['ng-html2js']
45 },
46
47 ngHtml2JsPreprocessor: {
48 stripPrefix: 'src/', //strip the src path from template url (http://stackoverflow.com/questions/22869668/karma-unexpected-request-when-testing-angular-directive-even-with-ng-html2js)
49 moduleName: 'templates' // define the template module name
50 },
51
52 // test results reporter to use
53 // possible values: 'dots', 'progress'
54 // available reporters: https://npmjs.org/browse/keyword/karma-reporter
55 reporters: ['mocha'],
56
57
58 // web server port
59 port: 9876,
60
61
62 // enable / disable colors in the output (reporters and logs)
63 colors: true,
64
65
66 // level of logging
67 // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
68 logLevel: config.LOG_INFO,
69
70
71 // enable / disable watching file and executing tests whenever any file changes
72 autoWatch: true,
73
74
75 // start these browsers
76 // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
77 browsers: ['PhantomJS'],
78
79
80 // Continuous Integration mode
81 // if true, Karma captures browsers, runs the tests and exits
82 singleRun: false
83 });
84};