-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkarma.config.js
More file actions
executable file
·74 lines (72 loc) · 2.45 KB
/
karma.config.js
File metadata and controls
executable file
·74 lines (72 loc) · 2.45 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
import istanbul from 'browserify-istanbul';
import isparta from 'isparta';
import {argv as args} from 'yargs';
import envify from 'envify/custom';
const Config = (config) => {
const options = {
autoWatch: true,
colors: true,
singleRun: args.build,
logLevel: args.debug ? config.LOG_DEBUG : config.LOG_INFO,
basePath: './',
browsers: ['Chrome'],
frameworks: ['jasmine', 'browserify'],
proxies: {
'/': 'http://localhost:9876/'
},
urlRoot: '/__karma__/',
preprocessors: {
'app/scripts/**/*.js': ['browserify'],
'app/scripts/**/*.jsx': ['browserify']
},
reporters: ['spec', 'coverage'],
coverageReporter: {
dir: 'coverage',
reporters: [
{ type: 'html', subdir: 'html' }
// { type: 'text', subdir: '.' }
// { type: 'lcovonly' }
],
instrumenterOptions: {
istanbul: {
noCompact: true
}
},
instrumenter: {
'app/scripts/**/*.spec.js': 'istanbul'
},
includeAllSources: true
},
specReporter: {
maxLogLines: 5, // limit number of lines logged per test
suppressErrorSummary: true, // do not print error summary
suppressFailed: false, // do not print information about failed tests
suppressPassed: false, // do not print information about passed tests
suppressSkipped: true, // do not print information about skipped tests
showSpecTiming: false // print the time elapsed for each spec
},
files: [
'app/scripts/app.main.js',
// 'node_modules/angular-mocks/angular-mocks.js',
'app/scripts/**/*.spec.js'
],
browserify: {
debug: true,
paths: ['app/scripts'],
extensions: ['.js', '.jsx'],
transform: [
'babelify',
'browserify-ngannotate',
envify({ENV_CONFIG: 'dev'}),
'bulkify',
istanbul({
instrumenter: isparta,
instrumenterConfig: { embedSource: true },
ignore: ['**/node_modules/**', '/**/*.spec.js']
})
]
}
};
config.set(options);
};
export default Config;