This repository has been archived by the owner on Jan 7, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathkarma.conf.js
61 lines (59 loc) · 1.64 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
'use strict';
var _ = require('lodash');
var defaultAssets = require('./config/assets/default');
var testAssets = require('./config/assets/test');
module.exports = function(config) {
config.set({
basePath: '',
frameworks: ['jasmine'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('karma-spec-reporter'),
require('karma-ng-html2js-preprocessor'),
require('karma-babel-preprocessor')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
files: _.union(
defaultAssets.client.lib.js,
defaultAssets.client.lib.tests,
defaultAssets.client.js,
defaultAssets.client.views,
testAssets.tests.client
),
preprocessors: {
'modules/*/client/views/**/*.html': ['ng-html2js'],
'modules/*/client/**/*.js': ['babel']
},
ngHtml2JsPreprocessor: {
moduleName: 'mean',
cacheIdFromPath: function(filepath) {
return filepath;
}
},
babelPreprocessor: {
options: {
sourceMap: 'inline'
}
},
coverageIstanbulReporter: {
reports: ['html', 'lcovonly', 'text-summary'],
dir: './build/coverage/client',
combineBrowserReports: true,
skipFilesWithNoCoverage: true,
fixWebpackSourcePaths: true
},
reporters: ['spec', 'coverage-istanbul', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: false,
browsers: ['Chrome'],
singleRun: true,
concurrency: Infinity
});
};