-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
83 lines (63 loc) · 1.77 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
module.exports = function (config) {
'use strict';
config.set({
basePath: '',
port: 9267,
runnerPort: 9100,
colors: true,
autoWatch: true,
logLevel: config.LOG_INFO,
browsers: ['Firefox'],
captureTimeout: 60000,
browserDisconnectTolerance: 0,
browserNoActivityTimeout: 60000,
singleRun: true,
plugins: [
'karma-jasmine',
//'karma-phantomjs-launcher',
'karma-chrome-launcher',
'karma-firefox-launcher',
'karma-coverage',
'karma-ng-html2js-preprocessor',
'karma-spec-reporter'
],
coverageReporter: {
type: 'html',
dir: 'coverage/'
},
htmlReporter: {
outputDir: 'karma_html',
templatePath: __dirname + '/node_modules/karma-html-reporter/jasmine_template.html'
},
files: [
// app core dependencies
'node_modules/jquery/dist/jquery.js',
'test/test-helper.js',
'node_modules/ui-core/lib/content/js/angular.js',
'node_modules/ui-core/lib/content/js/main.js',
'node_modules/lodash/dist/lodash.min.js',
'node_modules/d3/d3.min.js',
'test/angular-mocks.js',
// app module dependencies
'lib/src/**/*.js',
'lib/src/*.js',
//directive templates
'lib/src/**/*.html',
'lib/src/**/*.svg',
// test scripts
'test/**/*.test.js'
],
reporters: ['coverage', 'progress', 'html'],
preprocessors: {
'lib/src/**/*.html': ['ng-html2js'],
'lib/src/**/*.svg': ['ng-html2js']
},
ngHtml2JsPreprocessor: {
// immitates ui-core
prependPrefix: '/$iui-alerts',
stripPrefix: 'lib/src',
moduleName: 'templates'
},
frameworks: ['jasmine']
});
};