blob: 02c1cb1d3cd7cffd515b8b60e256951732507a7d [file] [log] [blame]
Matteo Scandolo7d539d32016-05-25 08:53:11 -07001// 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([
Matteo Scandolob9fb6252016-05-26 15:09:55 -070029 'node_modules/babel-polyfill/dist/polyfill.js',
Matteo Scandolo195dde92016-07-25 16:43:16 -070030 './src/vendor/ng-xos-lib/dist/ngXosVendor.min.js',
31 './src/vendor/ng-xos-lib/dist/ngXosHelpers.min.js',
32 'src/js/main.js',
Matteo Scandolo7d539d32016-05-25 08:53:11 -070033 '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'],
49 'spec/**/*.test.js': ['babel'],
Matteo Scandolo195dde92016-07-25 16:43:16 -070050 'spec/**/*.mock.js': ['babel'],
Matteo Scandolo7d539d32016-05-25 08:53:11 -070051 'src/**/*.html': ['ng-html2js']
52 },
53
54 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
Matteo Scandolo195dde92016-07-25 16:43:16 -070084 browsers: ['PhantomJS'],
Matteo Scandolo7d539d32016-05-25 08:53:11 -070085
86
87 // Continuous Integration mode
88 // if true, Karma captures browsers, runs the tests and exits
89 singleRun: false
90 });
91};