Simon Hunt | 449630f | 2014-12-09 11:40:00 -0800 | [diff] [blame] | 1 | // Karma configuration |
Simon Hunt | 449630f | 2014-12-09 11:40:00 -0800 | [diff] [blame] | 2 | |
| 3 | module.exports = function(config) { |
| 4 | config.set({ |
| 5 | |
| 6 | // base path that will be used to resolve all patterns (eg. files, exclude) |
Simon Hunt | 5d12dc2 | 2015-01-05 16:56:22 -0800 | [diff] [blame] | 7 | // the path is relative to this (karma.conf.js) file |
Simon Hunt | 449630f | 2014-12-09 11:40:00 -0800 | [diff] [blame] | 8 | 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 Hunt | f306972 | 2014-12-16 18:15:37 -0800 | [diff] [blame] | 18 | // library code... |
| 19 | '../tp/angular.js', |
| 20 | '../tp/angular-mocks.js', |
Simon Hunt | 5d12dc2 | 2015-01-05 16:56:22 -0800 | [diff] [blame] | 21 | '../tp/angular-route.js', |
Simon Hunt | f306972 | 2014-12-16 18:15:37 -0800 | [diff] [blame] | 22 | '../tp/d3.js', |
| 23 | '../tp/topojson.v1.min.js', |
| 24 | '../tp/jquery-2.1.1.min.js', |
| 25 | |
| 26 | // production code... |
Simon Hunt | dc6362a | 2014-12-18 19:55:23 -0800 | [diff] [blame] | 27 | // make sure modules are defined first... |
Simon Hunt | f306972 | 2014-12-16 18:15:37 -0800 | [diff] [blame] | 28 | '../app/onos.js', |
Simon Hunt | 0541fb8 | 2015-01-14 18:59:57 -0800 | [diff] [blame] | 29 | '../app/directives.js', |
Simon Hunt | dc6362a | 2014-12-18 19:55:23 -0800 | [diff] [blame] | 30 | '../app/fw/util/util.js', |
Simon Hunt | 7ac7be9 | 2015-01-06 10:47:56 -0800 | [diff] [blame] | 31 | '../app/fw/svg/svg.js', |
Simon Hunt | e672044 | 2015-01-15 12:21:06 -0800 | [diff] [blame] | 32 | '../app/fw/remote/remote.js', |
Simon Hunt | dc6362a | 2014-12-18 19:55:23 -0800 | [diff] [blame] | 33 | // now load services etc. that augment the modules |
| 34 | '../app/**/*.js', |
Simon Hunt | f306972 | 2014-12-16 18:15:37 -0800 | [diff] [blame] | 35 | |
| 36 | // unit test code... |
Simon Hunt | dc6362a | 2014-12-18 19:55:23 -0800 | [diff] [blame] | 37 | 'app/*-spec.js', |
| 38 | 'app/**/*-spec.js' |
Simon Hunt | 449630f | 2014-12-09 11:40:00 -0800 | [diff] [blame] | 39 | ], |
| 40 | |
| 41 | |
| 42 | // list of files to exclude |
| 43 | exclude: [ |
| 44 | ], |
| 45 | |
| 46 | |
| 47 | // preprocess matching files before serving them to the browser |
| 48 | // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor |
| 49 | preprocessors: { |
| 50 | }, |
| 51 | |
| 52 | |
| 53 | // test results reporter to use |
| 54 | // possible values: 'dots', 'progress' |
| 55 | // available reporters: https://npmjs.org/browse/keyword/karma-reporter |
| 56 | reporters: ['progress'], |
| 57 | |
| 58 | |
| 59 | // web server port |
| 60 | port: 9876, |
| 61 | |
| 62 | |
| 63 | // enable / disable colors in the output (reporters and logs) |
| 64 | colors: true, |
| 65 | |
| 66 | |
| 67 | // level of logging |
| 68 | // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG |
| 69 | logLevel: config.LOG_INFO, |
| 70 | |
| 71 | |
| 72 | // enable / disable watching file and executing tests whenever any file changes |
| 73 | autoWatch: true, |
| 74 | |
| 75 | |
| 76 | // start these browsers |
| 77 | // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher |
| 78 | browsers: ['Chrome'], |
| 79 | |
| 80 | |
| 81 | // Continuous Integration mode |
| 82 | // if true, Karma captures browsers, runs the tests and exits |
| 83 | singleRun: false |
| 84 | }); |
| 85 | }; |