1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
/*
Copyright 2016-2017, Huawei Technologies Co., Ltd.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
'use strict';
// Karma configuration
module.exports = function (config) {
config.set({
// Frameworks to use
frameworks: ['jasmine'],
// List of files / patterns to load in the browser
files: [
'src/bower_components/jquery/dist/jquery.js',
'src/bower_components/es5-shim/es5-shim.js',
'src/bower_components/json3/lib/json3.min.js',
'src/bower_components/angular/angular.js',
'src/bower_components/angular-aria/angular-aria.js',
'src/bower_components/angular-resource/angular-resource.js',
'src/bower_components/angular-mocks/angular-mocks.js',
'src/bower_components/angular-cookies/angular-cookies.js',
'src/bower_components/angular-sanitize/angular-sanitize.js',
'src/bower_components/angular-animate/angular-animate.js',
'src/bower_components/angular-touch/angular-touch.js',
'src/bower_components/angular-ui-router/release/angular-ui-router.js',
'src/bower_components/angular-aria/angular-aria.js',
'src/bower_components/angular-material/angular-material.js',
'src/bower_components/angular-messages/angular-messages.js',
'src/bower_components/angular-material-icons/angular-material-icons.js',
'app/app.js',
'app/modules/home/homeModule.js',
'app/modules/home/homeCtrl.js',
'app/modules/home/homeRoute.js',
'app/modules/home/homeService.js',
'app/modules/home/home-test.js',
'app/modules/user/userModule.js',
'app/modules/user/userCtrl.js',
'app/modules/user/userRoute.js',
'app/modules/user/userService.js',
'app/modules/user/user-test.js',
'app/modules/marketplace/marketplaceModule.js',
'app/modules/marketplace/marketplaceCtrl.js',
'app/modules/marketplace/marketplaceRoute.js',
'app/modules/marketplace/marketplaceService.js',
'app/modules/marketplace/marketplace-test.js',
'app/modules/about/aboutModule.js',
'app/modules/about/aboutCtrl.js',
'app/modules/about/aboutRoute.js',
'app/modules/about/aboutService.js',
'app/modules/about/about-test.js',
],
// Test results reporter to use
// Possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
//reporters: ['progress'],
reporters: ['spec'],
plugins : [
'karma-jasmine',
'karma-coverage',
'karma-chrome-launcher',
'karma-firefox-launcher',
'karma-phantomjs-launcher',
'karma-spec-reporter'
],
// Web server port
port: 9876,
// Enable / disable colors in the output (reporters and logs)
colors: true,
// Level of logging
// Possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,
// Enable / disable watching file and executing tests whenever any file changes
autoWatch: true,
// Start these browsers, currently available:
// - Chrome
// - ChromeCanary
// - Firefox
// - Opera
// - Safari (only Mac)
// - PhantomJS
// - IE (only Windows)
browsers: ['PhantomJS'],
// If browser does not capture in given timeout [ms], kill it
captureTimeout: 60000,
// Continuous Integration mode
// If true, it capture browsers, run tests and exit
singleRun: true
});
};
|