blob: fddf81a4448d291bc6d488787ec17871163e91a1 [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...
19 '../tp/angular.js',
20 '../tp/angular-mocks.js',
21 '../tp/angular-route.js',
22 '../tp/angular-cookies.js',
23 '../tp/d3.js',
24 '../tp/topojson.v1.min.js',
Steven Burrows202034f2017-08-11 12:08:01 +010025 '../tp/lodash.min.js',
Matteo Scandolo812aa5a2016-04-19 18:12:45 -070026
27 // production code...
28 // make sure modules are defined first...
29 '../onos.js',
30
31 '../app/fw/util/util.js',
32 '../app/fw/svg/svg.js',
33 '../app/fw/remote/remote.js',
34 '../app/fw/widget/widget.js',
35 '../app/fw/layer/layer.js',
36
37 '../app/view/topo/topo.js',
38
39 // now load services etc. that augment the modules
40 '../app/**/*.js',
41
42 // unit test code...
43 'app/*-spec.js',
Matteo Scandolo231c7542016-05-20 11:13:11 -070044 'app/**/*-spec.js',
45
46 // server mock
47 './server.mock.js'
Matteo Scandolo812aa5a2016-04-19 18:12:45 -070048 ],
49
50
51 // list of files to exclude
52 exclude: [
53 ],
54
55
56 // preprocess matching files before serving them to the browser
57 // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
58 preprocessors: {
59 },
60
61
62 // test results reporter to use
63 // possible values: 'dots', 'progress'
64 // available reporters: https://npmjs.org/browse/keyword/karma-reporter
65 reporters: ['mocha'],
66
67
68 // web server port
69 port: 9876,
70
71
72 // enable / disable colors in the output (reporters and logs)
73 colors: true,
74
75
76 // level of logging
77 // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
78 logLevel: config.LOG_DISABLE,
79
80
81 // enable / disable watching file and executing tests whenever any file changes
82 autoWatch: false,
83
84
85 // start these browsers
86 // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
87 browsers: ['PhantomJS'],
88
89
90 // Continuous Integration mode
91 // if true, Karma captures browsers, runs the tests and exits
92 singleRun: true
93 });
94};