UserController tests up
[portal.git] / ecomp-portal-FE-os / karma.conf.js
1 // Karma configuration
2 // http://karma-runner.github.io/0.10/config/configuration-file.html
3
4 module.exports = function (config) {
5     config.set({
6         // base path, that will be used to resolve files and exclude
7         basePath: '',
8
9         // testing framework to use (jasmine/mocha/qunit/...)
10         frameworks: ['jasmine'],
11
12         // list of files / patterns to load in the browser
13         files: [
14             'client/bower_components/jquery/dist/jquery.js',
15             'client/bower_components/angular/angular.js',
16             'client/bower_components/angular-animate/angular-animate.js',
17             'client/bower_components/angular-aria/angular-aria.js',
18             'client/bower_components/angular-bootstrap/ui-bootstrap-tpls.js',
19             'client/bower_components/angular-cookies/angular-cookies.js',
20             // 'client/bower_components/angular-gestures/gestures.js',
21             'client/bower_components/angular-material/angular-material.js',
22             'client/bower_components/angular-messages/angular-messages.js',
23             'client/bower_components/angular-mocks/angular-mocks.js',
24             'client/bower_components/angular-resource/angular-resource.js',
25             'client/bower_components/angular-route/angular-route.js',
26             'client/bower_components/angular-sanitize/angular-sanitize.js',
27             'client/bower_components/angular-scenario/angular-scenario.js',
28             'client/bower_components/angular-smart-table/dist/smart-table.js',
29             'client/bower_components/angular-ui-router/release/angular-ui-router.js',
30             'client/bower_components/angular-uuid/uuid.js',
31             'client/bower_components/es5-shim/es5-shim.js',
32             'client/bower_components/hammerjs/hammer.js',
33             'client/bower_components/jqtree/tree.jquery.js',
34             'client/bower_components/json3/lib/json3.js',
35             'client/bower_components/lodash/lodash.js',
36             'client/bower_components/ng-dialog/js/ngDialog.js',
37             'client/bower_components/ui-select/dist/select.js',
38
39             'client/utils/test-utils/test-utils.js',
40
41             'client/app/configurations.js',
42             'client/app/app.js',
43             // 'client/app/**/users*.js',
44             // 'client/app/**/users/**/new-user*.js',
45             'client/app/**/home/applications-home/applications-home*.js',
46             // 'client/app/**/widgets/**/widget-details*.js',
47             // 'client/app/**/tabs/**/tabs*.js',
48
49             'client/app/**/*filter*.js',
50             'client/app/**/*.coffee',
51             'client/app/**/*.jade',
52             'client/app/**/*.html',
53             'client/bower_components_external/angular.att.abs-2.17.0/att-abs-tpls.js',
54             'client/bower_components/hammerjs/hammer.js',
55             'client/bower_components/angular-gestures/gestures.js',
56             'client/bower_components/ng-dialog/js/ngDialog.js',
57             'client/bower_components/angular-cache/dist/angular-cache.js',
58             'client/bower_components_external/angular-att-gridster/*.js',
59             'client/bower_components_external/angular-att-gridster/*.js'
60         ],
61         // coverage reporter generates the coverage
62         reporters: ['progress', 'coverage'],
63
64         // coverage reporter configuration
65         coverageReporter: {
66             type : 'html',
67             dir : 'coverage/'
68         },
69
70         preprocessors: {
71             '**/*.jade': 'ng-jade2js',
72             '**/*.html': 'html2js',
73             'client/app/**/*.js': ['babel'],
74             'client/app/**/!(*spec|*mock).js': ['coverage'],
75             // '**/*.coffee': 'coffee'
76         },
77
78         ngHtml2JsPreprocessor: {
79             stripPrefix: 'client/'
80         },
81
82         ngJade2JsPreprocessor: {
83             stripPrefix: 'client/'
84         },
85
86
87         babelPreprocessor: {
88             options: {
89                 sourceMap: 'inline'
90             },
91             filename: function (file) {
92                 return file.originalPath.replace(/\.js$/, '.es5.js');
93             },
94             sourceFileName: function (file) {
95                 return file.originalPath;
96             }
97         },
98
99
100         // list of files / patterns to exclude
101         exclude: [],
102
103         // web server port
104         port: 8092,
105
106         // level of logging
107         // possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
108         logLevel: config.LOG_ERROR,
109
110
111         // enable / disable watching file and executing tests whenever any file changes
112         autoWatch: false,
113
114
115         // Start these browsers, currently available:
116         // - Chrome
117         // - ChromeCanary
118         // - Firefox
119         // - Opera
120         // - Safari (only Mac)
121         // - PhantomJS
122         // - IE (only Windows)
123         browsers: ['Firefox'],
124
125         // Continuous Integration mode
126         // if true, it capture browsers, run tests and exit
127         singleRun: true
128
129
130     });
131 };