blob: 803ebb14160f283415f00d5d6724656ad761164d [file] [log] [blame]
Matteo Scandolof0830892015-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 Scandolo89b179c2016-03-24 11:38:50 -070014console.log('bower', bowerComponents)
15
Matteo Scandolof0830892015-11-05 11:58:53 +010016module.exports = function(config) {
17/*eslint-enable*/
18 config.set({
19
20 // base path that will be used to resolve all patterns (eg. files, exclude)
21 basePath: '',
22
23
24 // frameworks to use
25 // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
26 frameworks: ['jasmine'],
27
28
29 // list of files / patterns to load in the browser
30 files: bowerComponents.concat([
Matteo Scandolo89b179c2016-03-24 11:38:50 -070031 //'./api/**/*.js',
32 './xosHelpers/src/*.module.js',
33 //'./xosHelpers/src/**/*.js',
34 './xosHelpers/spec/**/*.test.js'
Matteo Scandolof0830892015-11-05 11:58:53 +010035 ]),
36
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 Scandolo89b179c2016-03-24 11:38:50 -070046 '**/*.test.js': ['babel']
Matteo Scandolof0830892015-11-05 11:58:53 +010047 },
48
Matteo Scandolo89b179c2016-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 Scandolof0830892015-11-05 11:58:53 +010057 },
58
Matteo Scandolo89b179c2016-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 Scandolof0830892015-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 Scandolo89b179c2016-03-24 11:38:50 -070080 logLevel: config.LOG_INFO,
Matteo Scandolof0830892015-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
89 browsers: ['PhantomJS'],
90
91
92 // Continuous Integration mode
93 // if true, Karma captures browsers, runs the tests and exits
94 singleRun: false
95 });
96};