e0740d44a4ed6eb4207b31314e32114a026e00ae
[Packages/TYPO3.CMS.git] / components / testing_framework / Resources / Core / Build / Configuration / JSUnit / karma.conf.js
1 'use strict';
2
3 /**
4 * Karma configuration
5 */
6
7 module.exports = function(config) {
8 config.set({
9 // base path that will be used to resolve all patterns (eg. files, exclude)
10 basePath: '../../../../../../../',
11
12 // frameworks to use
13 // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
14 frameworks: ['jasmine', 'requirejs'],
15
16 // list of files / patterns to load in the browser
17 files: [
18 { pattern: 'typo3/sysext/core/Resources/Public/JavaScript/Contrib/jquery/jquery-3.1.1.js', included: true },
19 { pattern: 'typo3/sysext/**/Resources/Public/JavaScript/**/*.js', included: false },
20 { pattern: 'typo3/sysext/**/Tests/JavaScript/**/*.js', included: false },
21 'components/testing_framework/Resources/Core/Build/Configuration/JSUnit/Helper.js',
22 'components/testing_framework/Resources/Core/Build/Configuration/JSUnit/Bootstrap.js'
23 ],
24
25 // list of files to exclude
26 exclude: [
27 ],
28
29 // preprocess matching files before serving them to the browser
30 // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
31 preprocessors: {
32 'typo3/sysext/**/Resources/Public/JavaScript/**/*.js': ['coverage']
33 },
34
35 // test results reporter to use
36 // possible values: 'dots', 'progress', 'coverage', 'junit'
37 // available reporters: https://npmjs.org/browse/keyword/karma-reporter
38 reporters: ['progress', 'junit', 'coverage'],
39
40 junitReporter: {
41 outputDir: 'typo3temp/var/tests/',
42 useBrowserName: false,
43 outputFile: 'karma.junit.xml'
44 },
45
46 coverageReporter: {
47 reporters: [
48 {type: 'clover', dir: 'typo3temp', subdir: 'var/tests', file: 'karma.clover.xml'}
49 ]
50 },
51
52 // web server port
53 port: 9876,
54
55 // enable / disable colors in the output (reporters and logs)
56 colors: true,
57
58 // level of logging
59 // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
60 logLevel: config.LOG_INFO,
61
62 // enable / disable watching file and executing tests whenever any file changes
63 autoWatch: true,
64
65 // start these browsers
66 // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
67 // browsers: ['Firefox', 'Chrome', 'Safari', 'PhantomJS', 'Opera', 'IE'],
68 browsers: ['PhantomJS'],
69
70 // Continuous Integration mode
71 // if true, Karma captures browsers, runs the tests and exits
72 singleRun: false,
73
74 // Concurrency level
75 // how many browser should be started simultaneous
76 concurrency: Infinity
77 })
78 };