-
Notifications
You must be signed in to change notification settings - Fork 12
/
karma.conf.js
51 lines (41 loc) · 1.46 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
module.exports = function (config) {
config.set({
frameworks: ['jspm', 'jasmine', 'jasmine-matchers'],
files: [
'node_modules/karma-babel-preprocessor/node_modules/babel-core/browser-polyfill.js'
],
preprocessors: {
'core/**/!(*.spec).js': ['babel', 'coverage']
},
babelPreprocessor: { options: { stage: 0, sourceMap: 'inline' } },
/*basePath: 'core',*/
jspm: {
config: 'config.js',
loadFiles: ['core/**/*.spec.js'],
serveFiles: ['core/**/*.+(js|html|css)', 'mock/**/*.+(js|html|css)'],
stripExtension: true
},
proxies: {
'/core/' : '/base/core/',
'/mock/' : '/base/mock/',
'/jspm_packages/': '/base/jspm_packages/'
},
reporters: ['dots', 'coverage'],
coverageReporter: {
instrumenters: { isparta : require('isparta') },
instrumenter: { 'core/**/*.js': 'isparta' },
dir: 'reports/coverage/',
subdir: normalizationBrowserName,
reporters: [
{type: 'html'}, {type: 'json'}, {type: 'lcov'}, {type: 'text-summary'}
]
},
/*logLevel: config.LOG_DEBUG,*/
browsers: ['PhantomJS'],
singleRun : false,
browserNoActivityTimeout: 75000
});
function normalizationBrowserName(browser) {
return browser.toLowerCase().split(/[ /-]/)[0];
}
};