-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.conf.js
94 lines (94 loc) · 3.87 KB
/
karma.conf.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
////
// Karma configuration
// Generated on Mon Feb 08 2016 20:19:32 GMT-0500 (EST)
//
// Note: see karma-* in package.json for a list of plugins
// or visit https://npmjs.org/browse/keyword/karma
////
module.exports = function (config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: [
'jasmine',
'browserify'
],
// list of files / patterns to load in the browser
files: [
// Vendor sources should match what is in index.ejs:
'client/vendor/jquery/jquery.js',
'client/vendor/angular/angular.js',
'client/vendor/angular-mocks/angular-mocks.js',
'client/vendor/angular-animate/angular-animate.js',
'client/vendor/angular-sanitize/angular-sanitize.js',
'client/vendor/angular-resource/angular-resource.js',
'client/vendor/angular-route/angular-route.js',
'client/vendor/angular-ui-router/angular-ui-router.js',
'client/vendor/angular-ui-select/select.js',
'client/vendor/angular-ui-utils/ui-utils.js',
'client/vendor/angular-nvd3/angular-nvd3.js',
'client/vendor/ng-lodash/ng-lodash.js',
'client/vendor/angular-spinner/angular-spinner.js',
'client/vendor/angular-ui-bootstrap/dist/ui-bootstrap.js',
'client/vendor/angular-ui-bootstrap/dist/ui-bootstrap-tpls.js',
'client/vendor/clipboard/clipboard.min.js',
'client/vendor/ngclipboard/ngclipboard.min.js',
'client/vendor/moment/moment-with-locales.min.js',
'client/vendor/fullcalendar/fullcalendar.min.js',
'client/vendor/fullcalendar/gcal.js',
'client/vendor/angular-ui-calendar/calendar.min.js',
// User defined sources:
'client/javascript/app.js',
'client/javascript/**/*.js',
'client/javascript/dist/templates.js',
'specs/frontend/*Spec.js',
'specs/frontend/**/*Spec.js'
],
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['progress', 'coverage'],
// list of files to exclude
exclude: [
// Custom code that doesn't exactly conform to JSLint. Need to fix.
'client/javascript/directives/tree.js',
'client/javascript/controllers/calendarController.js',
'client/javascript/directives/calendar.js',
// don't test the minified distribution code as the code should already be tested as-is
'client/javascript/dist/*.js'
],
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
'client/javascript/**/*.js': ['coverage'],
'specs/frontend/**/*Spec.js': ['browserify'],
// browserify framework allows requires in the specs
'specs/frontend/*Spec.js': ['browserify']
},
// configure the coverage checker
coverageReporter: {
// includeAllSources: true,
type: 'html',
dir: 'code_coverage/'
},
// web server port
port: 9876,
// enable / disable colors in the output (reporters and logs)
colors: true,
// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_ERROR,
// enable / disable watching file and executing tests whenever any file changes
// Note: recommend disabling as this triggers an exception.
// See: https://github.com/nikku/karma-browserify/issues/75
autoWatch: false,
// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['PhantomJS'],
// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: true
});
};