-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma-config.js
58 lines (53 loc) · 1.61 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
var paths = require('./gulp/paths');
var _config = {
basePath: '',
browsers: [ 'PhantomJS' ],
frameworks: [ 'jspm', 'jasmine' ],
reporters: [ 'mocha' ],//, 'coverage' ],
port: 9876,
plugins: [
'karma-jasmine',
'karma-jspm',
'karma-phantomjs-launcher',
// 'karma-chrome-launcher',
'karma-babel-preprocessor',
'karma-mocha-reporter'//,
// 'karma-coverage'
],
// files: [],
// autoWatch: true,
jspm: {
// useBundles: true,
// paths: {
// '*': 'src/*.js'
// },
// loadFiles: [ 'src/base-model/base-model2-spec.js' ],//paths.files.src.test ],
loadFiles: [ paths.files.src.test ],
serveFiles: [ paths.files.src.non_test ],
config: paths.files.config.jspm
},
preprocessors: {}, // set below
babelPreprocessor: {
options: {
// sourceMap: 'inline',
// modules: 'system'
presets: ['es2015']
}
},
// coverageReporter: {
// dir: 'tests/coverage/',
// reporters: [
// {type: 'lcovonly', file: 'lcov.info', subdir: '.'},
// {type: 'html', subdir: '.'}
// ]
// },
mochaReporter: {
output: 'minimal' // full, autowatch, minimal, noFailures
},
singleRun: false
};
_config.preprocessors[ paths.files.src.js ] = [ 'babel' ];//, 'coverage'];
module.exports = function ( config ) {
_config.logLevel = config.LOG_INFO; // config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
config.set( _config );
};