1 | // Karma configuration for unit testing |
---|
2 | // Generated on Tue Dec 03 2013 11:33:27 GMT+0100 (CET) |
---|
3 | |
---|
4 | module.exports = function(config) { |
---|
5 | config.set({ |
---|
6 | |
---|
7 | // base path, that will be used to resolve files and exclude |
---|
8 | basePath: '../..', |
---|
9 | |
---|
10 | |
---|
11 | // frameworks to use |
---|
12 | frameworks: ['jasmine'], |
---|
13 | |
---|
14 | |
---|
15 | // list of files / patterns to load in the browser |
---|
16 | files: [ |
---|
17 | 'lib/AngularJS-1.2.5/angular.js', |
---|
18 | 'lib/AngularJS-1.2.5/angular-route.js', |
---|
19 | 'lib/AngularJS-1.2.5/angular-resource.js', |
---|
20 | 'lib/UI-bootstrap/ui-bootstrap-tpls-0.7.0.js', |
---|
21 | 'test/lib/AngularJS-1.2.5/angular-mocks.js', |
---|
22 | 'scripts/modules.js', |
---|
23 | 'scripts/controllers.js', |
---|
24 | 'scripts/directives.js', |
---|
25 | 'scripts/services.js', |
---|
26 | 'test/unit/*_spec.js' |
---|
27 | ], |
---|
28 | |
---|
29 | |
---|
30 | // list of files to exclude |
---|
31 | exclude: [ |
---|
32 | |
---|
33 | ], |
---|
34 | |
---|
35 | |
---|
36 | // test results reporter to use |
---|
37 | // possible values: 'dots', 'progress', 'junit', 'growl', 'coverage' |
---|
38 | reporters: ['progress', 'spec', 'coverage', 'osx', 'junit'], |
---|
39 | |
---|
40 | preprocessors: { |
---|
41 | // source files, that you wanna generate coverage for |
---|
42 | // do not include tests or libraries |
---|
43 | // (these files will be instrumented by Istanbul) |
---|
44 | 'site/scripts/controllers.js': ['coverage'] |
---|
45 | }, |
---|
46 | |
---|
47 | // optionally, configure the reporter |
---|
48 | coverageReporter: { |
---|
49 | type: 'html', |
---|
50 | dir: 'test/karma/test_out/coverage-unit/' |
---|
51 | }, |
---|
52 | |
---|
53 | // the default configuration |
---|
54 | junitReporter: { |
---|
55 | outputFile: 'test/karma/test_out/test-results-unit.xml', |
---|
56 | suite: '' |
---|
57 | }, |
---|
58 | |
---|
59 | |
---|
60 | // web server port |
---|
61 | port: 9876, |
---|
62 | |
---|
63 | |
---|
64 | // enable / disable colors in the output (reporters and logs) |
---|
65 | colors: true, |
---|
66 | |
---|
67 | |
---|
68 | // level of logging |
---|
69 | // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG |
---|
70 | logLevel: config.LOG_INFO, |
---|
71 | |
---|
72 | |
---|
73 | // enable / disable watching file and executing tests whenever any file changes |
---|
74 | autoWatch: true, |
---|
75 | |
---|
76 | |
---|
77 | // Start these browsers, currently available: |
---|
78 | // - Chrome |
---|
79 | // - ChromeCanary |
---|
80 | // - Firefox |
---|
81 | // - Opera (has to be installed with `npm install karma-opera-launcher`) |
---|
82 | // - Safari (only Mac; has to be installed with `npm install karma-safari-launcher`) |
---|
83 | // - PhantomJS |
---|
84 | // - IE (only Windows; has to be installed with `npm install karma-ie-launcher`) |
---|
85 | browsers: ['Chrome', 'Firefox', 'Safari'], |
---|
86 | |
---|
87 | |
---|
88 | // If browser does not capture in given timeout [ms], kill it |
---|
89 | captureTimeout: 60000, |
---|
90 | |
---|
91 | |
---|
92 | // Continuous Integration mode |
---|
93 | // if true, it capture browsers, run tests and exit |
---|
94 | singleRun: false, |
---|
95 | |
---|
96 | plugins: [ |
---|
97 | 'karma-junit-reporter', |
---|
98 | 'karma-chrome-launcher', |
---|
99 | 'karma-firefox-launcher', |
---|
100 | 'karma-safari-launcher', |
---|
101 | 'karma-jasmine', |
---|
102 | 'karma-coverage', |
---|
103 | 'karma-ng-scenario', |
---|
104 | 'karma-osx-reporter', |
---|
105 | 'karma-spec-reporter' |
---|
106 | ] |
---|
107 | }); |
---|
108 | }; |
---|