blob: 9d9e77e0b9384aa7819256bcbe7b0a1158476bea [file] [log] [blame]
Matteo Scandolo68c2e722015-12-04 10:14:40 -08001// 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});
Matteo Scandolo54bc5f72016-05-18 14:06:45 -070013
Matteo Scandolo1b9ffac2015-12-14 17:36:09 -080014module.exports = function(config) {
Matteo Scandolo54bc5f72016-05-18 14:06:45 -070015/*eslint-enable*/
Matteo Scandolo68c2e722015-12-04 10:14:40 -080016 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
Matteo Scandolo88b220e2016-06-17 11:57:05 -070028 files: [
Matteo Scandolo8420f622016-03-24 11:38:50 -070029 '../../../xos/core/xoslib/static/js/vendor/ngXosVendor.js',
Matteo Scandolo895b30a2016-02-02 16:04:31 -080030 '../../../xos/core/xoslib/static/js/vendor/ngXosHelpers.js',
Matteo Scandolo88b220e2016-06-17 11:57:05 -070031 ].concat(bowerComponents).concat([
Matteo Scandolo8420f622016-03-24 11:38:50 -070032 'src/js/main.js',
Matteo Scandolo68c2e722015-12-04 10:14:40 -080033 'src/js/**/*.js',
34 'spec/**/*.mock.js',
35 'spec/**/*.test.js',
36 'src/**/*.html'
37 ]),
38
39
40 // list of files to exclude
41 exclude: [
42 ],
43
44
45 // preprocess matching files before serving them to the browser
46 // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
47 preprocessors: {
48 'src/js/**/*.js': ['babel'],
Matteo Scandolo54bc5f72016-05-18 14:06:45 -070049 'spec/**/*.test.js': ['babel'],
50 'spec/**/*.mock.js': ['babel'],
Matteo Scandolo68c2e722015-12-04 10:14:40 -080051 'src/**/*.html': ['ng-html2js']
52 },
53
Matteo Scandolo68c2e722015-12-04 10:14:40 -080054 ngHtml2JsPreprocessor: {
55 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)
56 moduleName: 'templates' // define the template module name
57 },
58
59 // test results reporter to use
60 // possible values: 'dots', 'progress'
61 // available reporters: https://npmjs.org/browse/keyword/karma-reporter
62 reporters: ['mocha'],
63
64
65 // web server port
66 port: 9876,
67
68
69 // enable / disable colors in the output (reporters and logs)
70 colors: true,
71
72
73 // level of logging
74 // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
75 logLevel: config.LOG_INFO,
76
77
78 // enable / disable watching file and executing tests whenever any file changes
79 autoWatch: true,
80
81
82 // start these browsers
83 // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
84 browsers: ['PhantomJS'],
85
86
87 // Continuous Integration mode
88 // if true, Karma captures browsers, runs the tests and exits
89 singleRun: false
90 });
91};