blob: d7f7d18121462829c1c677e37f14f4b3b17bc472 [file] [log] [blame]
Matteo Scandolo812aa5a2016-04-19 18:12:45 -07001// Karma configuration
2
3module.exports = function(config) {
4 config.set({
5
6 // base path that will be used to resolve all patterns (eg. files, exclude)
7 // the path is relative to this (karma.conf.js) file
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: [
18 // library code...
Steven Burrows91458672017-08-16 11:53:38 +010019 '../vendor/angular/angular.min.js',
20 '../vendor/angular-mocks/index.js',
21 '../vendor/angular-route/angular-route.min.js',
22 '../vendor/angular-cookies/angular-cookies.min.js',
23 '../vendor/d3/d3.min.js',
24 '../vendor/topojson/topojson.js',
25 '../vendor/Chart.js/dist/Chart.min.js',
26 '../vendor/angular-chart.js/dist/angular-chart.min.js',
27 '../vendor/lodash/index.js',
Matteo Scandolo812aa5a2016-04-19 18:12:45 -070028
29 // production code...
30 // make sure modules are defined first...
31 '../onos.js',
32
33 '../app/fw/util/util.js',
34 '../app/fw/svg/svg.js',
35 '../app/fw/remote/remote.js',
36 '../app/fw/widget/widget.js',
37 '../app/fw/layer/layer.js',
38
39 '../app/view/topo/topo.js',
40
41 // now load services etc. that augment the modules
42 '../app/**/*.js',
43
44 // unit test code...
45 'app/*-spec.js',
Matteo Scandolo231c7542016-05-20 11:13:11 -070046 'app/**/*-spec.js',
47
48 // server mock
49 './server.mock.js'
Matteo Scandolo812aa5a2016-04-19 18:12:45 -070050 ],
51
52
53 // list of files to exclude
54 exclude: [
55 ],
56
57
58 // preprocess matching files before serving them to the browser
59 // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
60 preprocessors: {
61 },
62
63
64 // test results reporter to use
65 // possible values: 'dots', 'progress'
66 // available reporters: https://npmjs.org/browse/keyword/karma-reporter
67 reporters: ['mocha'],
68
69
70 // web server port
71 port: 9876,
72
73
74 // enable / disable colors in the output (reporters and logs)
75 colors: true,
76
77
78 // level of logging
79 // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
80 logLevel: config.LOG_DISABLE,
81
82
83 // enable / disable watching file and executing tests whenever any file changes
84 autoWatch: false,
85
86
87 // start these browsers
88 // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
89 browsers: ['PhantomJS'],
90
91
92 // Continuous Integration mode
93 // if true, Karma captures browsers, runs the tests and exits
94 singleRun: true
95 });
96};