blob: 242d8b09f328661cb3726c8c32868a230cffd214 [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 Scandolo195dde92016-07-25 16:43:16 -070014
Matteo Scandolo1b9ffac2015-12-14 17:36:09 -080015module.exports = function(config) {
Matteo Scandolo54bc5f72016-05-18 14:06:45 -070016/*eslint-enable*/
Matteo Scandolo68c2e722015-12-04 10:14:40 -080017 config.set({
18
19 // base path that will be used to resolve all patterns (eg. files, exclude)
20 basePath: '',
21
22
23 // frameworks to use
24 // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
25 frameworks: ['jasmine'],
26
27
28 // list of files / patterns to load in the browser
Matteo Scandolo195dde92016-07-25 16:43:16 -070029 files: ['./src/vendor/ng-xos-lib/dist/ngXosVendor.min.js']
30 .concat(bowerComponents).concat([
31 './src/vendor/ng-xos-lib/dist/ngXosHelpers.min.js',
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};