Repository navigation
Expand file tree
/
Copy pathkarma.conf.template.js
More file actions
73 lines (58 loc) · 2.57 KB
/
Copy pathkarma.conf.template.js
File metadata and controls
73 lines (58 loc) · 2.57 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
'use strict'
/* eslint-disable @typescript-eslint/no-var-requires */
const path = require('path')
module.exports = (config) => ({
// Increase timeout in case connection in CI is slow
captureTimeout: 120000,
browserNoActivityTimeout: 300000,
browserDisconnectTimeout: 300000,
browserDisconnectTolerance: 3,
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['mocha', 'fixture', 'source-map-support'],
// list of files / patterns to load in the browser
files: [
'tests/test-browser.built.spec.js'
],
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['progress', 'junit', 'coverage-istanbul'],
coverageIstanbulReporter: {
// reports can be any that are listed here: https://github.com/istanbuljs/istanbuljs/tree/73c25ce79f91010d1ff073aa6ff3fd01114f90db/packages/istanbul-reports/lib
reports: ['html', 'text', 'cobertura', 'text-summary'],
// base output directory. If you include %browser% in the path it will be replaced with the karma browser name
dir: path.join(__dirname, 'coverage', '%browser%'),
// Combines coverage information from multiple browsers into one report rather than outputting a report
// for each browser.
combineBrowserReports: false,
// if using webpack and pre-loaders, work around webpack breaking the source path
fixWebpackSourcePaths: true,
// Omit files with no statements, no functions and no branches covered from the report
skipFilesWithNoCoverage: true,
verbose: true // output config used by istanbul for debugging
},
junitReporter: {
outputDir: 'test-results', // results will be saved as $outputDir/$browserName.xml
useBrowserName: true // add browser name to report and classes names
},
// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: true,
// web server port
port: 9876,
// enable / disable colors in the output (reporters and logs)
colors: true,
// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,
// enable / disable watching file and executing tests whenever any file changes
autoWatch: false,
// Concurrency level
// how many browser should be started simultaneous
concurrency: 1,
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
// list of files to exclude
exclude: []
})