blob: 060e7dd18e8319d813bf8c992a4b44764313c56a [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
Matteo Scandolo061094b2016-03-24 14:07:49 -070014var files = bowerComponents.concat([
15 'api/**/*.js',
16 'xosHelpers/src/*.module.js',
17 'xosHelpers/src/**/*.js',
18 'xosHelpers/spec/**/*.test.js'
19]);
20
Matteo Scandolo57483dd2015-11-05 11:58:53 +010021module.exports = function(config) {
22/*eslint-enable*/
23 config.set({
24
25 // base path that will be used to resolve all patterns (eg. files, exclude)
26 basePath: '',
27
28
29 // frameworks to use
30 // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
31 frameworks: ['jasmine'],
32
33
34 // list of files / patterns to load in the browser
Matteo Scandolo061094b2016-03-24 14:07:49 -070035 files: files,
Matteo Scandolo57483dd2015-11-05 11:58:53 +010036
37
38 // list of files to exclude
39 exclude: [
40 ],
41
42
43 // preprocess matching files before serving them to the browser
44 // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
45 preprocessors: {
Matteo Scandolo8420f622016-03-24 11:38:50 -070046 '**/*.test.js': ['babel']
Matteo Scandolo57483dd2015-11-05 11:58:53 +010047 },
48
Matteo Scandolo8420f622016-03-24 11:38:50 -070049 babelPreprocessor: {
50 options: {
51 presets: ['es2015'],
52 sourceMap: 'inline'
53 },
54 filename: function (file) {
55 return file.originalPath;
56 },
Matteo Scandolo57483dd2015-11-05 11:58:53 +010057 },
58
Matteo Scandolo8420f622016-03-24 11:38:50 -070059 //ngHtml2JsPreprocessor: {
60 // 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)
61 // moduleName: 'templates' // define the template module name
62 //},
63
Matteo Scandolo57483dd2015-11-05 11:58:53 +010064 // test results reporter to use
65 // possible values: 'dots', 'progress'
66 // available reporters: https://npmjs.org/browse/keyword/karma-reporter
67 reporters: ['mocha'],
68
69
70 // web server port
71 port: 9876,
72
73
74 // enable / disable colors in the output (reporters and logs)
75 colors: true,
76
77
78 // level of logging
79 // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
Matteo Scandolo7dea2432016-03-24 15:11:29 -070080 logLevel: config.LOG_ERROR,
Matteo Scandolo57483dd2015-11-05 11:58:53 +010081
82
83 // enable / disable watching file and executing tests whenever any file changes
84 autoWatch: true,
85
86
87 // start these browsers
88 // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
Matteo Scandolo061094b2016-03-24 14:07:49 -070089 browsers: ['PhantomJS', 'Chrome'],
Matteo Scandolo57483dd2015-11-05 11:58:53 +010090
91
92 // Continuous Integration mode
93 // if true, Karma captures browsers, runs the tests and exits
94 singleRun: false
95 });
96};