blob: 90d1ed015a3e3d0c3a2f67e8be145d1c186eec08 [file] [log] [blame]
Jeremy Mowery6efeb7a2016-02-25 09:32:00 -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
Matteo Scandolo195dde92016-07-25 16:43:16 -070014// add Blob polyfill for Phantom.js
15bowerComponents.push('src/vendor/Blob.js/Blob.js');
16
Jeremy Mowery6efeb7a2016-02-25 09:32:00 -070017module.exports = function(config) {
18/*eslint-enable*/
19 config.set({
20
21 // base path that will be used to resolve all patterns (eg. files, exclude)
22 basePath: '',
23
24
25 // frameworks to use
26 // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
27 frameworks: ['jasmine'],
28
29
30 // list of files / patterns to load in the browser
31 files: bowerComponents.concat([
Matteo Scandolo195dde92016-07-25 16:43:16 -070032 './src/vendor/ng-xos-lib/dist/ngXosVendor.min.js',
33 './src/vendor/ng-xos-lib/dist/ngXosHelpers.min.js',
34 'src/js/main.js',
Jeremy Mowery6efeb7a2016-02-25 09:32:00 -070035 'src/js/**/*.js',
36 'spec/**/*.mock.js',
37 'spec/**/*.test.js',
38 'src/**/*.html'
39 ]),
40
41
42 // list of files to exclude
43 exclude: [
44 ],
45
46
47 // preprocess matching files before serving them to the browser
48 // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
49 preprocessors: {
50 'src/js/**/*.js': ['babel'],
51 'spec/**/*.test.js': ['babel'],
Matteo Scandolo195dde92016-07-25 16:43:16 -070052 'spec/**/*.mock.js': ['babel'],
Jeremy Mowery6efeb7a2016-02-25 09:32:00 -070053 'src/**/*.html': ['ng-html2js']
54 },
55
56 ngHtml2JsPreprocessor: {
57 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)
58 moduleName: 'templates' // define the template module name
59 },
60
61 // test results reporter to use
62 // possible values: 'dots', 'progress'
63 // available reporters: https://npmjs.org/browse/keyword/karma-reporter
64 reporters: ['mocha'],
65
66
67 // web server port
68 port: 9876,
69
70
71 // enable / disable colors in the output (reporters and logs)
72 colors: true,
73
74
75 // level of logging
76 // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
77 logLevel: config.LOG_INFO,
78
79
80 // enable / disable watching file and executing tests whenever any file changes
81 autoWatch: true,
82
83
84 // start these browsers
85 // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
86 browsers: ['PhantomJS'],
87
88
89 // Continuous Integration mode
90 // if true, Karma captures browsers, runs the tests and exits
91 singleRun: false
92 });
93};