forked from OpenLMIS/openlmis-requisition-refUI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.config.js
63 lines (55 loc) · 1.42 KB
/
karma.config.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
module.exports = function (config) {
config.set({
basePath: './',
frameworks: ['jasmine'],
plugins: [
'karma-jasmine',
'karma-coverage',
'karma-phantomjs-launcher',
'karma-htmlfile-reporter',
'karma-junit-reporter',
'karma-ng-html2js-preprocessor'
],
/* FILES */
files: [
'build/public/openlmis.js',
'bower_components/angular-mocks/angular-mocks.js',
'src/**/specs/**/*.js',
'src/**/*.spec.js',
'build/public/**/*.html'
],
exclude: [],
/* REPORTERS */
reporters: ['progress', 'coverage', 'html', 'junit'],
junitReporter: {
outputDir: 'build/test/test-results'
},
coverageReporter: {
type: 'html',
dir: 'build/test/coverage/'
},
htmlReporter: {
outputFile: 'build/test/karma/units.html'
},
preprocessors: {
'**/*.js': ['coverage'], // Might not work....
'**/*.html': ['ng-html2js']
},
ngHtml2JsPreprocessor: {
stripPrefix: 'build/public/',
moduleName: 'openlmis-templates'
},
/* KARMA PROCESS */
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
captureTimeout: 30000,
singleRun: true,
autoWatch: true,
browsers: ['PhantomJS'],
phantomjsLauncher: {
// Have phantomjs exit if a ResourceError is encountered (useful if karma exits without killing phantom)
exitOnResourceError: true
}
});
};