forked from tilfinltd/aws-extend-switch-roles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.conf.js
49 lines (49 loc) · 1.25 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
module.exports = function(config) {
config.set({
basePath: '.',
frameworks: ['mocha', 'chai', 'fixture'],
files: [
{
pattern: 'test/fixtures/**/*',
},
'src/sanitizer.js',
'src/lib/*.js',
'test/**/*.test.js'
],
preprocessors: {
'test/**/*.html': ['html2js'],
'test/**/*.json': ['json_fixtures'],
'src/**/*.js': ['coverage']
},
reporters: ['progress', 'coverage'],
coverageReporter: {
reporters: [
// generates ./coverage/lcov.info
{ type:'lcovonly', subdir: '.' },
// generates ./coverage/coverage-final.json
{ type:'json', subdir: '.' },
]
},
colors: true,
logLevel: config.LOG_INFO,
browsers: ['Chrome', 'ChromeHeadless', 'MyHeadlessChrome'],
customLaunchers: {
MyHeadlessChrome: {
base: 'ChromeHeadless',
flags: ['--disable-translate', '--disable-extensions', '--remote-debugging-port=9223']
}
},
jsonFixturesPreprocessor: {
variableName: '__json__'
},
plugins: [
'karma-chrome-launcher',
'karma-mocha',
'karma-chai',
'karma-coverage',
'karma-fixture',
'karma-html2js-preprocessor',
'karma-json-fixtures-preprocessor'
]
})
}