-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkarma.conf.js
More file actions
80 lines (65 loc) · 1.46 KB
/
Copy pathkarma.conf.js
File metadata and controls
80 lines (65 loc) · 1.46 KB
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
'use strict';
var path = require('path');
var _ = require('lodash');
function listFiles() {
var patterns = [
'dist/lib/angular.js',
'node_modules/angular-mocks/angular-mocks.js',
'dist/lib/angular-ui-router.js',
'dist/**/*.js',
'client/**/*.spec.js',
'dist/**/*.html',
];
var files = patterns.map(function(pattern) {
return {
pattern: pattern
};
});
files.push({
pattern: 'client/style/**/*',
included: false,
served: true,
watched: false
});
files.push({
pattern: path.resolve(require.resolve('dirty-chai')),
included: true,
served: true,
watched: false
});
return files;
}
module.exports = function(config) {
config.set({
files: listFiles(),
singleRun: true,
autoWatch: false,
ngHtml2JsPreprocessor: {
stripPrefix: 'dist/',
moduleName: 'myHandsOn',
},
logLevel: 'WARN',
frameworks: ['phantomjs-shim', 'mocha', 'chai-as-promised', 'chai'],
browsers : ['PhantomJS'],
plugins : [
'karma-phantomjs-launcher',
'karma-phantomjs-shim',
'karma-coverage',
'karma-mocha',
'karma-chai-as-promised',
'karma-chai',
'karma-ng-html2js-preprocessor'
],
/*coverageReporter: {
type : 'html',
dir : 'coverage/',
},*/
reporters: ['progress'],
proxies: {
'/assets/': path.join('/base/client/assets/'),
},
preprocessors: {
'dist/**/*.html': ['ng-html2js'],
},
});
};