blob: 56b86076fe16c304725cf1a0dde7ed5df532bdba [file] [log] [blame]
Simon Hunt449630f2014-12-09 11:40:00 -08001// Karma configuration
Simon Hunt449630f2014-12-09 11:40:00 -08002
3module.exports = function(config) {
4 config.set({
5
6 // base path that will be used to resolve all patterns (eg. files, exclude)
Simon Hunt5d12dc22015-01-05 16:56:22 -08007 // the path is relative to this (karma.conf.js) file
Simon Hunt449630f2014-12-09 11:40:00 -08008 basePath: '',
9
10
11 // frameworks to use
12 // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
13 frameworks: ['jasmine'],
14
15
16 // list of files / patterns to load in the browser
17 files: [
Simon Huntf3069722014-12-16 18:15:37 -080018 // library code...
19 '../tp/angular.js',
20 '../tp/angular-mocks.js',
Simon Hunt5d12dc22015-01-05 16:56:22 -080021 '../tp/angular-route.js',
Simon Huntf3069722014-12-16 18:15:37 -080022 '../tp/d3.js',
23 '../tp/topojson.v1.min.js',
24 '../tp/jquery-2.1.1.min.js',
25
26 // production code...
Simon Huntdc6362a2014-12-18 19:55:23 -080027 // make sure modules are defined first...
Simon Huntf3069722014-12-16 18:15:37 -080028 '../app/onos.js',
Simon Huntdc6362a2014-12-18 19:55:23 -080029 '../app/fw/util/util.js',
Simon Hunt7ac7be92015-01-06 10:47:56 -080030 '../app/fw/svg/svg.js',
Simon Huntdc6362a2014-12-18 19:55:23 -080031 // now load services etc. that augment the modules
32 '../app/**/*.js',
Simon Huntf3069722014-12-16 18:15:37 -080033
34 // unit test code...
Simon Huntdc6362a2014-12-18 19:55:23 -080035 'app/*-spec.js',
36 'app/**/*-spec.js'
Simon Hunt449630f2014-12-09 11:40:00 -080037 ],
38
39
40 // list of files to exclude
41 exclude: [
42 ],
43
44
45 // preprocess matching files before serving them to the browser
46 // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
47 preprocessors: {
48 },
49
50
51 // test results reporter to use
52 // possible values: 'dots', 'progress'
53 // available reporters: https://npmjs.org/browse/keyword/karma-reporter
54 reporters: ['progress'],
55
56
57 // web server port
58 port: 9876,
59
60
61 // enable / disable colors in the output (reporters and logs)
62 colors: true,
63
64
65 // level of logging
66 // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
67 logLevel: config.LOG_INFO,
68
69
70 // enable / disable watching file and executing tests whenever any file changes
71 autoWatch: true,
72
73
74 // start these browsers
75 // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
76 browsers: ['Chrome'],
77
78
79 // Continuous Integration mode
80 // if true, Karma captures browsers, runs the tests and exits
81 singleRun: false
82 });
83};