25669924a8204a9679e681184d1cc3bb630a7a86
[evergreen-equinox.git] / Open-ILS / web / js / ui / default / staff / test / karma.conf.js
1 module.exports = function(config){
2     config.set({
3     basePath : '../',
4
5     // config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
6     logLevel: config.LOG_INFO,
7
8     files : [
9       'build/js/lovefield.min.js',
10       'build/js/vendor.bundle.js',
11       'build/js/core.bundle.js',
12       'node_modules/angular-mocks/angular-mocks.js', // testing only
13       'node_modules/angular-file-saver/dist/angular-file-saver.bundle.min.js',
14       'node_modules/ng-toast/dist/ngToast.min.js',
15       'node_modules/angular-sanitize/angular-sanitize.min.js',
16       /* OpenSRF must be installed first */
17       '/openils/lib/javascript/md5.js',
18       '/openils/lib/javascript/JSON_v1.js',
19       '/openils/lib/javascript/opensrf.js',
20       '/openils/lib/javascript/opensrf_ws.js',
21
22       // mock data for testing only
23       'test/data/IDL2js.js',
24       'test/data/eg_mock.js',
25
26       // service/*.js have to be loaded in order
27       'services/grid.js',
28       'services/patron_search.js',
29       'services/user-bucket.js',
30
31       // load app scripts
32       'app.js',
33       'circ/**/*.js',
34       'cat/**/*.js',
35       'reporter/**/*.js',
36       'admin/**/*.js',
37       'test/unit/egIDL.js', // order matters for some of these
38       'test/unit/egOrg.js', 
39       'test/unit/**/*.js'
40     ],
41
42     // test results reporter to use
43     // possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
44     reporters: ['spec'],  // detailed report
45     //reporters: ['progress'], // summary report
46
47     // enable / disable colors in the output (reporters and logs)
48     colors: true,
49
50     // enable / disable watching file and executing tests whenever any file changes
51     autoWatch : false,
52
53     frameworks: ['jasmine'],
54
55     browsers: ['ChromeHeadless','FirefoxHeadless'],
56
57     customLaunchers: {
58         'FirefoxHeadless': {
59             base: 'Firefox',
60             flags: [
61                 '-headless',
62             ],
63         }
64     },
65
66     // web server port
67     port: 9876,
68
69     /*
70     coverageReporter: {
71       type : 'html',
72       dir : 'coverage/',
73     },
74
75     preprocessors: {
76       '../src/*.js': ['coverage']
77     },
78     */
79
80     // If browser does not capture in given timeout [ms], kill it
81     captureTimeout: 60000,
82
83     // Continuous Integration mode
84     // if true, it capture browsers, run tests and exit
85     singleRun: true
86 })}